test/tools/javac/enum/Enum2.java

Print this page

        

*** 24,34 **** /* * @test * @summary enums: an enumeration type may not be extended * @author gafter * ! * @compile/fail -source 1.5 Enum2.java */ public class Enum2 { enum e1 { red, green, blue } static class e2 extends e1 {} --- 24,34 ---- /* * @test * @summary enums: an enumeration type may not be extended * @author gafter * ! * @compile/fail Enum2.java */ public class Enum2 { enum e1 { red, green, blue } static class e2 extends e1 {}