jdk-24/test/langtools/tools/javac/enum/NestedEnum.java
Vicente Romero 9a19eb6918 8254105: allow static nested declarations
Reviewed-by: mcimadamore
2020-11-21 03:17:57 +00:00

16 lines
337 B
Java

/*
* @test /nodynamiccopyright/
* @bug 5071831
* @summary javac allows enum in an inner class for source >= 16
* @author gafter
*
* @compile/fail/ref=NestedEnum.out -XDrawDiagnostics -source 15 NestedEnum.java
* @compile NestedEnum.java
*/
class NestedEnum {
class Inner {
enum NotAllowedInNonStaticInner {}
}
}