f064e2b028
Reviewed-by: jjg
15 lines
306 B
Java
15 lines
306 B
Java
/*
|
|
* @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;
|
|
}
|
|
}
|