This program produces the wrong local variable index for x.
class Test {
public static void main(String argv[]) {
for (int y = 0, yi = 0 ; y < 10 ; y++) {
int x = 5;
yi = y + yi + x;
}
}
}
Method void main(oak/lang/String [])
0 iconst_0
1 istore_1
2 iconst_0
3 istore_2
4 goto 18
7 iconst_5
8 istore_1 <<= y
9 iload_1 1
10 iload_2 2 <<= yi
11 iadd
12 iload_1 1 <<= x
13 iadd
14 istore_2
15 iinc 1 1
18 iload_1 1
19 bipush 10
21 if_icmplt 7
24 return