Bug 81945

Summary: [compiler] Enum and Duplicate case error
Product: [Eclipse Project] JDT Reporter: Bart Geraci <BJGeraci>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: cap
Version: 3.1   
Target Milestone: 3.1 M5   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Bart Geraci CLA 2004-12-27 17:53:08 EST
Using 200412162000

Given the class:
----
public class Test1<X> {
  enum Option { ALPHA, BRAVO  };
  void method1(Option item) {
    switch (item) {
    case ALPHA:      break;
    case BRAVO:      break;
    }
  }
}
----

It compiles without warning using sun's javac.

Eclipse generates an error for the two "case"s in the switch 
 statement with the error "Duplicate case"

If Test1 does NOT have generic arguments, then Eclipse does 
 not complain.

If the Enumerated type Option is moved to a separate file, 
 Eclipse does not complain.
Comment 1 Jerome Lanneluc CLA 2005-01-11 07:12:03 EST
*** Bug 82319 has been marked as a duplicate of this bug. ***
Comment 2 Philipe Mulet CLA 2005-01-11 17:56:01 EST
ParameterizedFieldBinding did not carry proper id.
Added EnumTest#test063.
Comment 3 Philipe Mulet CLA 2005-01-11 17:56:21 EST
Fixed
Comment 4 Jerome Lanneluc CLA 2005-02-15 05:41:56 EST
Verified in I20050214