Bug 93396 - [1.5] problem with recovery and enum constant body
Summary: [1.5] problem with recovery and enum constant body
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M7   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-02 06:59 EDT by David Audel CLA
Modified: 2005-05-12 14:22 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Audel CLA 2005-05-02 06:59:42 EDT
I20050426-1700

1) create p/BadEnum.java
package p;
public class BadEnum {
  public interface EnumInterface<T extends Object> {
      public T getMethod();
  }
  public enum EnumClass implements EnumInterface<String> {
     ENUM1 { public String getMethod() { return "ENUM1";} },
     ENUM2 { public String getMethod() { return "ENUM2";} };
  }
}
}

2) compile

The type new BadEnum.EnumClass(){} must implement the inherited abstract method
BadEnum.EnumInterface<String>.getMethod()
The type new BadEnum.EnumClass(){} must implement the inherited abstract method
BadEnum.EnumInterface<String>.getMethod()
Syntax error on token "}", delete this token	BadEnum.java

Only the last error is correct.
Comment 1 David Audel CLA 2005-05-02 08:54:05 EDT
Fixed and test added
  EnumTests#test103

Tests updated
  EnumDietRecoveryTest#test0003()
  EnumDietRecoveryTest#test0004()
  EnumDietRecoveryTest#test0005()
  EnumDietRecoveryTest#test0006()
  EnumDietRecoveryTest#test0007()
  EnumDietRecoveryTest#test0008()
  EnumDietRecoveryTest#test0009()
  EnumDietRecoveryTest#test0010()
  EnumDietRecoveryTest#test0011()
  EnumDietRecoveryTest#test0014()
  EnumDietRecoveryTest#test0015()
Comment 2 Olivier Thomann CLA 2005-05-12 14:22:21 EDT
Verified in I20050510-0010 + JDT/Core v_556