Skip to content

Commit 1c227b7

Browse files
authored
Merge pull request #1660 from smowton/smowton/fix/lazy_methods_array_parameters
TG-1877: Include array pointer types in needed classes
2 parents e2cda1a + ae89c94 commit 1c227b7

File tree

26 files changed

+241
-10
lines changed

26 files changed

+241
-10
lines changed
Binary file not shown.
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CORE
2+
test.class
3+
--lazy-methods --verbosity 10 --function test.g
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
elaborate java::test\.f:\(\)I
7+
VERIFICATION SUCCESSFUL
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
public class test {
3+
4+
public int f() { return 1; }
5+
6+
public static void g(test[] args) {
7+
8+
if(args == null || args.length != 1 || args[0] == null)
9+
return;
10+
asserthere.doassert(args[0].f() == 1);
11+
12+
}
13+
14+
}
15+
16+
class asserthere {
17+
18+
// Used to avoid lazy-loading currently marking any class with an
19+
// $assertionsEnabled member (i.e. any class that asserts) as needed.
20+
public static void doassert(boolean condition) { assert(condition); }
21+
22+
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CORE
2+
test.class
3+
--lazy-methods --verbosity 10 --function test.g
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
elaborate java::test\.f:\(\)I
7+
VERIFICATION SUCCESSFUL
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
public class test {
3+
4+
public int f() { return 1; }
5+
6+
public static void g(container c) {
7+
8+
if(c == null)
9+
return;
10+
test[] args = c.test_array;
11+
if(args == null || args.length != 1 || args[0] == null)
12+
return;
13+
asserthere.doassert(args[0].f() == 1);
14+
15+
}
16+
17+
}
18+
19+
class container {
20+
public test[] test_array;
21+
}
22+
23+
class asserthere {
24+
25+
// Used to avoid lazy-loading currently marking any class with an
26+
// $assertionsEnabled member (i.e. any class that asserts) as needed.
27+
public static void doassert(boolean condition) { assert(condition); }
28+
29+
}
Binary file not shown.

0 commit comments

Comments
 (0)