author | mcimadamore |
Wed, 26 Oct 2016 15:41:25 +0100 | |
changeset 41856 | 13a056e8f16e |
parent 25308 | 190cac01c316 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
25308
190cac01c316
8044236: create .out files for DefiniteAssignment tests in tools/javac dir
sogoel
parents:
5520
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
10 | 3 |
* @bug 4718142 |
4 |
* @summary DU analysis not conservative for try-finally |
|
5 |
* @author Neal Gafter (gafter) |
|
6 |
* |
|
25308
190cac01c316
8044236: create .out files for DefiniteAssignment tests in tools/javac dir
sogoel
parents:
5520
diff
changeset
|
7 |
* @compile/fail/ref=T4718142a.out -XDrawDiagnostics T4718142a.java |
10 | 8 |
*/ |
9 |
||
10 |
class T4718142a { |
|
11 |
public static void main(String[] args) { |
|
12 |
final int i; |
|
13 |
for (int n=0; n<10; n++) { |
|
14 |
b: { |
|
15 |
try { |
|
16 |
if (true) break b; |
|
17 |
} finally { |
|
18 |
i = n; |
|
19 |
System.out.println("i = " + i); |
|
20 |
} |
|
21 |
return; |
|
22 |
} |
|
23 |
} |
|
24 |
} |
|
25 |
} |