Bug 41516

Summary: incorrect errors in compilationUnit.getProblems()
Product: [Eclipse Project] JDT Reporter: Kelvin <kelvin>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: RESOLVED DUPLICATE QA Contact:
Severity: major    
Priority: P3    
Version: 2.1.1   
Target Milestone: 3.0 M3   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Kelvin CLA 2003-08-13 18:11:10 EDT
Test case :

file : A.java
public class A {

    public void method() {
        switch(1) {
             case B.ONE : break;
             case B.TWO : break;
        }
    }
}

file : B.java
public interface B {
    int ONE = 1;
    int TWO = 2;
}

If you compile these the A.java, there shouldn't have any compilation error. 
However, in :

IProblem[] probs 
  = compilationUnit.getProblems();  // org.eclipse.jdt.core.dom.CompilationUnit

You will see two errors are found. Both are "case expressions must be constant 
expressions"
Comment 1 Olivier Thomann CLA 2003-08-14 09:55:29 EDT
Looks like a duplicate of bug 40476.
Comment 2 Olivier Thomann CLA 2003-08-14 10:55:12 EDT
Close as duplicate of bug 40476.

*** This bug has been marked as a duplicate of 40476 ***