Bug 97066 - compile error happens if the constants defined in the method inner class are used in switch context
Summary: compile error happens if the constants defined in the method inner class are...
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.1 RC2   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-27 15:13 EDT by xwg CLA
Modified: 2005-06-08 06:31 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 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