LabeledDeclaration.java revision 2658:089e1adc7136
19313Ssos/* 29313Ssos * @test /nodynamiccopyright/ 39313Ssos * @bug 4039843 8057652 49313Ssos * @summary The compiler should not allow labeled declarations. 59313Ssos * @author turnidge 69313Ssos * 79313Ssos * @compile/fail/ref=LabeledDeclaration.out -XDrawDiagnostics LabeledDeclaration.java 89313Ssos */ 99313Ssos 109313Ssosclass LabeledDeclaration { 119313Ssos void method() { 129313Ssos foo: int i = 111; 139313Ssos } 149313Ssos} 159313Ssos