Skip to content

Commit a284810

Browse files
committed
Add test for accessing a qualified generic member field
1 parent 3d299a5 commit a284810

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
public class Test {
2+
3+
public Generic<Integer> field;
4+
5+
public Generic<Integer> main() {
6+
return field;
7+
}
8+
9+
}
10+
11+
class Generic<T> { }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
CORE
2+
Test.class
3+
--function Test.main --validate-goto-model
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--
8+
^warning: ignoring
9+
--
10+
This test ensures that the member_exprt generated to return a qualified generic
11+
field has the correct type, otherwise we'll fail model validation.
12+
Prior to ec4160829cc9c22ff71e647dd2894439720ad89c we would have created a
13+
non-matching type (Generic<Integer> vs. Generic)

0 commit comments

Comments
 (0)