Bug 108830 - [compiler] Improve switch fault-tolerance
Summary: [compiler] Improve switch fault-tolerance
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.2 M5   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-06 09:35 EDT by Philipe Mulet CLA
Modified: 2006-02-14 12:32 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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