jdk-24/test/langtools/tools/javac/enum/LocalEnum.java
Vicente Romero 9efdaacc31 8242478: compiler implementation for records (Second Preview)
Reviewed-by: mcimadamore, jlahoda, darcy
2020-05-17 11:09:52 -04:00

15 lines
321 B
Java

/*
* @test /nodynamiccopyright/
* @bug 5019609
* @summary javac fails to reject local enums
* @author gafter
* @compile/fail/ref=LocalEnum.out -XDrawDiagnostics LocalEnum.java
* @compile --enable-preview -source ${jdk.version} LocalEnum.java
*/
public class LocalEnum {
void f() {
enum B {}
}
}