2007-12-01 00:00:00 +00:00
|
|
|
/*
|
2014-09-05 23:51:39 +00:00
|
|
|
* @test /nodynamiccopyright/
|
2014-10-09 08:08:52 +00:00
|
|
|
* @bug 4039843 8057652
|
2007-12-01 00:00:00 +00:00
|
|
|
* @summary The compiler should not allow labeled declarations.
|
|
|
|
* @author turnidge
|
|
|
|
*
|
2014-09-05 23:51:39 +00: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;
|
|
|
|
}
|
|
|
|
}
|