langtools/test/tools/javac/LabeledDeclaration.java
author lana
Tue, 25 Apr 2017 07:38:50 +0000
changeset 44909 b53c770dc04f
parent 26993 513b2cae81c3
permissions -rw-r--r--
Added tag jdk-10+1 for changeset 3a409afd3f86

/*
 * @test  /nodynamiccopyright/
 * @bug 4039843 8057652
 * @summary The compiler should not allow labeled declarations.
 * @author turnidge
 *
 * @compile/fail/ref=LabeledDeclaration.out -XDrawDiagnostics  LabeledDeclaration.java
 */

class LabeledDeclaration {
    void method() {
    foo: int i = 111;
    }
}