1 /*
2  * @test /nodynamiccopyright/
3  * @bug 4407643
4  * @summary javac throws NullPointerException for break to label outside of class
5  * @author gafter
6  *
7  * @compile/fail/ref=BreakAcrossClass.out -XDrawDiagnostics  BreakAcrossClass.java
8  */
9 
10 class BreakAcrossClass {
main(String argv[])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 }
24