2007-12-01 00:00:00 +00:00
|
|
|
/*
|
2014-07-07 19:44:20 +00:00
|
|
|
* @test /nodynamiccopyright/
|
2007-12-01 00:00:00 +00:00
|
|
|
* @bug 5071831
|
2022-07-29 17:35:22 +00:00
|
|
|
* @summary javac allows enum in an inner class for release >= 16
|
2007-12-01 00:00:00 +00:00
|
|
|
* @author gafter
|
|
|
|
*
|
2022-07-29 17:35:22 +00:00
|
|
|
* @compile/fail/ref=NestedEnum.out -XDrawDiagnostics --release 15 NestedEnum.java
|
2020-11-21 03:17:57 +00:00
|
|
|
* @compile NestedEnum.java
|
2007-12-01 00:00:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
class NestedEnum {
|
|
|
|
class Inner {
|
|
|
|
enum NotAllowedInNonStaticInner {}
|
|
|
|
}
|
|
|
|
}
|