jdk-24/test/langtools/tools/javac/enum/NestedEnum.java

16 lines
337 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 5071831
* @summary javac allows enum in an inner class for source >= 16
2007-12-01 00:00:00 +00:00
* @author gafter
*
* @compile/fail/ref=NestedEnum.out -XDrawDiagnostics -source 15 NestedEnum.java
* @compile NestedEnum.java
2007-12-01 00:00:00 +00:00
*/
class NestedEnum {
class Inner {
enum NotAllowedInNonStaticInner {}
}
}