Skip to content

Commit edb6908

Browse files
committed
Add variable-length array trace test
Without the fix in 3ccb482 this produces a trace containing nil expressions; with it, they are successfully evaluated constant expresssions as expected.
1 parent 3ccb482 commit edb6908

File tree

4 files changed

+31
-0
lines changed

4 files changed

+31
-0
lines changed
Binary file not shown.
Binary file not shown.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
public class VarLengthArrayTrace1 {
2+
3+
public static void main(int unknown, int arg2) {
4+
5+
Container c = new Container(unknown);
6+
if(c.val != 2) return;
7+
int[] arr = new int[c.val];
8+
arr[1] = arg2;
9+
int test = arr[1];
10+
assert(test != 10);
11+
12+
}
13+
14+
}
15+
16+
class Container {
17+
18+
public Container(int v) { val = v; }
19+
int val;
20+
21+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CORE
2+
VarLengthArrayTrace1.class
3+
--trace
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
dynamic_3_array\[1l\]=10
7+
--
8+
^warning: ignoring
9+
assignment removed
10+
irep("(\\"nil\\")")

0 commit comments

Comments
 (0)