langtools/test/tools/javac/LabeledDeclaration.java
author mchung
Wed, 27 May 2015 13:25:18 -0700
changeset 30846 2b3f379840f0
parent 26993 513b2cae81c3
permissions -rw-r--r--
8074432: Move jdeps and javap to jdk.jdeps module Reviewed-by: jjg, alanb, erikj

/*
 * @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;
    }
}