Bug 97066

Summary: compile error happens if the constants defined in the method inner class are used in switch context
Product: [Eclipse Project] JDT Reporter: xwg <xwgyjbb>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: major    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 RC2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description xwg CLA 2005-05-27 15:13:47 EDT
For the following code, Eclipse report compile error like "ConstDef cannot be 
resolved ". 

	void test() 
	{
		int item = 1;

		class ConstDef {
			final static int CONST_1 = 0;
		}
		
		switch(item)
		{
		case ConstDef.CONST_1:
                break;
		}
				
	}
Comment 1 Olivier Thomann CLA 2005-05-27 15:17:50 EDT
Could not reproduce in HEAD with:

public class X {
	void test() {
		int item = 1;

		class ConstDef {
			final static int CONST_1 = 0;
		}

		switch (item) {
			case ConstDef.CONST_1:
				break;
		}

	}
}

What build are you using?
Comment 2 Philipe Mulet CLA 2005-05-29 15:23:35 EDT
3.1rc1 doesn't reproduce it. Please reopen once steps to reproduce are available.
Comment 3 Frederic Fusier CLA 2005-06-08 06:31:22 EDT
reopen as it's not reproducible
Comment 4 Frederic Fusier CLA 2005-06-08 06:31:49 EDT
Cannot reproduce either with 3.1 RC2