File tree 3 files changed +27
-0
lines changed
jbmc/regression/jbmc/generic_static_field
3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+ public class Test <T > {
3
+
4
+ public static Test <Integer > static_field ;
5
+
6
+ public static Test <Integer > test () {
7
+
8
+ return static_field ;
9
+
10
+ }
11
+
12
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ Test.class
3
+ --function Test.test --validate-goto-model --show-goto-functions
4
+ ^EXIT=0$
5
+ ^SIGNAL=0$
6
+ Test\.test:\(\)LTest;#return_value = static_field;
7
+ --
8
+ ^warning: ignoring
9
+ --
10
+ This checks that the return value type matches the static field -- if it didn't,
11
+ either --validate-goto-model would throw because of a mismatching assignment, or
12
+ a cast would be used to adjust the type.
13
+
14
+ The original motivation for this test was that generic field references could
15
+ accidentally omit generic arguments that were present in function types.
You can’t perform that action at this time.
0 commit comments