author | lana |
Thu, 21 Jan 2016 09:46:01 -0800 | |
changeset 35340 | 38f7386ed942 |
parent 26901 | 2c11dc81a5c8 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
26901
2c11dc81a5c8
8055783: Group 9e: golden files for tests in tools/javac dir
sogoel
parents:
5520
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
10 | 3 |
* @bug 6306967 |
4 |
* @summary Variable x is used before initialized |
|
5 |
* @author Wei Tao |
|
26901
2c11dc81a5c8
8055783: Group 9e: golden files for tests in tools/javac dir
sogoel
parents:
5520
diff
changeset
|
6 |
* @compile/fail/ref=T6306967.out -XDrawDiagnostics T6306967.java |
10 | 7 |
*/ |
8 |
||
9 |
public class T6306967 { |
|
10 |
public static void main(String[] args) { |
|
11 |
final int x; |
|
12 |
while(true) { |
|
13 |
if (true) { |
|
14 |
break; |
|
15 |
} |
|
16 |
x = 1; |
|
17 |
} |
|
18 |
System.out.println(x); |
|
19 |
} |
|
20 |
} |