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
|
|
|
* @summary enums: an enumeration type may not be extended
|
|
|
|
* @author gafter
|
2014-07-07 19:44:20 +00:00
|
|
|
* @compile/fail/ref=Enum2.out -XDrawDiagnostics Enum2.java
|
2007-12-01 00:00:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
public class Enum2 {
|
|
|
|
enum e1 { red, green, blue }
|
|
|
|
static class e2 extends e1 {}
|
|
|
|
}
|