Bug 166866 - [1.5][compiler] Compiler doesn't report error when enum member has unimplemented abstract method
Summary: [1.5][compiler] Compiler doesn't report error when enum member has unimplemen...
Status: VERIFIED DUPLICATE of bug 156591
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.2   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-05 17:29 EST by Igor Tkach CLA
Modified: 2007-01-15 12:58 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Tkach CLA 2006-12-05 17:29:37 EST
The following code compiles fine in Eclipse:
public enum Test {
  A {
    @Override
    public String toString() {
      return a();
    }

    public abstract String a();
  }
}

but does not compile in javac (1.5.0_06):
$ javac Test.java
Test.java:10: <anonymous Test$1> is not abstract and does not override abstract method a() in
    public abstract String a();
                           ^
1 error
Comment 1 Olivier Thomann CLA 2006-12-05 22:11:06 EST
Closing as dup of bug 156591.
Added org.eclipse.jdt.core.tests.compiler.regression.EnumTest#test143 in HEAD and
org.eclipse.jdt.core.tests.compiler.regression.EnumTest#test142 in 3.2 maintenance stream.

*** This bug has been marked as a duplicate of bug 156591 ***
Comment 2 Eric Jodet CLA 2007-01-15 06:51:58 EST
verified for 3.2.2 using build M20070112-1200