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

19 lines
424 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 5009601
* @summary verify specialized enum classes can't be abstract
* @author Joseph D. Darcy
*
* @compile/fail/ref=FauxSpecialEnum1.out -XDrawDiagnostics FauxSpecialEnum1.java
2007-12-01 00:00:00 +00:00
*/
public enum FauxSpecialEnum1 {
INFRARED {
void test() {System.out.println("Concrete test");}
},
ULTRAVIOLET {
abstract void test();
};
abstract void test();
}