author | lana |
Thu, 21 Jan 2016 09:46:01 -0800 | |
changeset 35340 | 38f7386ed942 |
parent 26274 | 02a5b23ee21c |
permissions | -rw-r--r-- |
10 | 1 |
/* |
26274
02a5b23ee21c
8055074: Group 9a: golden files for tests in tools/javac dir
sogoel
parents:
5520
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
10 | 3 |
* @bug 4407643 |
4 |
* @summary javac throws NullPointerException for break to label outside of class |
|
5 |
* @author gafter |
|
6 |
* |
|
26274
02a5b23ee21c
8055074: Group 9a: golden files for tests in tools/javac dir
sogoel
parents:
5520
diff
changeset
|
7 |
* @compile/fail/ref=BreakAcrossClass.out -XDrawDiagnostics BreakAcrossClass.java |
10 | 8 |
*/ |
9 |
||
10 |
class BreakAcrossClass { |
|
11 |
public static void main(String argv[]) { |
|
12 |
final int i = 6; |
|
13 |
M: { |
|
14 |
class A { |
|
15 |
{ |
|
16 |
if (i != 5) break M; |
|
17 |
} |
|
18 |
} |
|
19 |
System.out.println("failed : " + i); |
|
20 |
} |
|
21 |
System.out.println("passed : " + i); |
|
22 |
} |
|
23 |
} |