jdk
1/*
2* @test /nodynamiccopyright/
3* @bug 4039843 8057652
4* @summary The compiler should not allow labeled declarations.
5* @author turnidge
6*
7* @compile/fail/ref=LabeledDeclaration.out -XDrawDiagnostics LabeledDeclaration.java
8*/
9
10class LabeledDeclaration {
11void method() {
12foo: int i = 111;
13}
14}
15