Bug 87064

Summary: [1.5]Enum implementing interface required to implement abstract methods in super class, not just each enum class
Product: [Eclipse Project] JDT Reporter: Lasse R. Nielsen <atwork>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Lasse R. Nielsen CLA 2005-03-03 08:34:15 EST
In the following code:
----

 interface TestInterface {
     int test();
 }

 public enum TestEnum implements TestInterface {
     TEST {
         public int test() {return 42;}
     },
     ENUM {
         public int test() {return 37;}
     };
 } 

----
In Eclipse 3.1M5 (and M4), the declaration of TestEnum is marked as erroneous 
(red squiggle below "TestEnum") with the error message:

  The type TestEnum must implement the inherited abstract method TestInterface.
test()

The code compiles without error with the Sun and JRockit compilers. 
The actual (behind the scene) class TestEnum (extending Enum<TestEnum>) should 
be abstract and not need to implement test().
Comment 1 Philipe Mulet CLA 2005-03-03 15:47:09 EST
It worked fine in M5 already (and was broken in M4).