Skip to content

Commit ae89c94

Browse files
committed
Lazy loading: assume concrete generic parameter types are needed
This extends the previous commit to assume that generic parameter types are needed, which overapproximates what is requried, but seems likely to suffice in most cases.
1 parent 80eb6a6 commit ae89c94

File tree

13 files changed

+118
-7
lines changed

13 files changed

+118
-7
lines changed
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
KNOWNBUG
1+
CORE
22
test.class
33
--lazy-methods --verbosity 10 --function test.g
44
^EXIT=0$
55
^SIGNAL=0$
66
elaborate java::test\.f:\(\)I
77
VERIFICATION SUCCESSFUL
8-
--
9-
--
10-
See https://diffblue.atlassian.net/browse/TG-1877
597 Bytes
Binary file not shown.
453 Bytes
Binary file not shown.
800 Bytes
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<Integer, test> 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<S, T> {
20+
public T[] 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+
}
506 Bytes
Binary file not shown.
308 Bytes
Binary file not shown.
301 Bytes
Binary file not shown.
674 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)