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

16 lines
340 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 release >= 16
2007-12-01 00:00:00 +00:00
* @author gafter
*
* @compile/fail/ref=NestedEnum.out -XDrawDiagnostics --release 15 NestedEnum.java
* @compile NestedEnum.java
2007-12-01 00:00:00 +00:00
*/
class NestedEnum {
class Inner {
enum NotAllowedInNonStaticInner {}
}
}