2007-12-01 00:00:00 +00:00
|
|
|
/*
|
2014-09-05 16:51:39 -07:00
|
|
|
* @test /nodynamiccopyright/
|
2007-12-01 00:00:00 +00:00
|
|
|
* @bug 4039843
|
|
|
|
* @summary The compiler should not allow labeled declarations.
|
|
|
|
* @author turnidge
|
|
|
|
*
|
2014-09-05 16:51:39 -07:00
|
|
|
* @compile/fail/ref=LabeledDeclaration.out -XDrawDiagnostics LabeledDeclaration.java
|
2007-12-01 00:00:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
class LabeledDeclaration {
|
|
|
|
void method() {
|
|
|
|
foo: int i = 111;
|
|
|
|
}
|
|
|
|
}
|