Bug 87064 - [1.5]Enum implementing interface required to implement abstract methods in super class, not just each enum class
Summary: [1.5]Enum implementing interface required to implement abstract methods in su...
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M6   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-03 08:34 EST by Lasse R. Nielsen CLA
Modified: 2005-03-03 15:47 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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).