jdk-24/test/langtools/tools/javac/NestedDuplicateLabels.java

15 lines
321 B
Java
Raw Normal View History

2007-12-01 00:00:00 +00:00
/*
* @test /nodynamiccopyright/
2007-12-01 00:00:00 +00:00
* @bug 1241001
* @summary The compiler failed to detect duplicate, nested labels.
* @author turnidge
*
* @compile/fail/ref=NestedDuplicateLabels.out -XDrawDiagnostics NestedDuplicateLabels.java
2007-12-01 00:00:00 +00:00
*/
class NestedDuplicateLabels {
void method() {
foo: { { foo: {} } }
}
}