Bug 108830

Summary: [compiler] Improve switch fault-tolerance
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: 3.1   
Target Milestone: 3.2 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Philipe Mulet CLA 2005-09-06 09:35:57 EDT
Build 3.1

When switch expression cannot be resolved, the case statements are not further
resolved. This could be improved.
Comment 1 Philipe Mulet CLA 2005-09-06 09:59:12 EDT
This may cause some imports to be flagged as unused (if only reference within
case statements).
Comment 2 Philipe Mulet CLA 2006-01-05 07:24:19 EST
Testcases:
public class X {
	
	void foo(){
		switch(this){
			case 0 : 
				Zork z1;
		}
	}
	
	void bar(){
		switch(x){
			case 0 : 
				Zork z2;
		}
	}	
}

Should also report unbound Zork references.
Comment 3 Philipe Mulet CLA 2006-01-05 07:26:59 EST
Added SwitchTest#test010. Made compiler more resilient in SwitchStatement.
Fixed
Comment 4 Philipe Mulet CLA 2006-01-05 07:31:28 EST
No plan to backport to 3.1 maintenance as only enhancement
Comment 5 Jerome Lanneluc CLA 2006-02-14 12:32:51 EST
Verified for 3.2 M5 using build I20060214-0010