langtools/test/tools/javac/LabeledDeclaration.java
author sogoel
Fri, 05 Sep 2014 16:51:39 -0700
changeset 26529 10ec5e52bf75
parent 5520 86e4b9a9da40
child 26993 513b2cae81c3
permissions -rw-r--r--
8055079: Group 9c: golden files for tests in tools/javac dir Reviewed-by: jjg

/*
 * @test  /nodynamiccopyright/
 * @bug 4039843
 * @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;
    }
}