Bug 89982

Summary: [1.5][compiler] Internal failure during missing enum case diagnosis
Product: [Eclipse Project] JDT Reporter: Frederic Fusier <frederic_fusier>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Frederic Fusier CLA 2005-04-01 11:36:36 EST
Build 20050331

Following code causes internal compiler failure:

package enums;

public class E {
	enum Numbers { ONE, TWO, THREE }
	static final String BLANK = "    ";
	void foo(Colors color) {
		switch (color) {
			case BLUE:
			case RED:
				break;
		} 
	}
}
/**
 * Enumeration of some basic colors.
 */
enum Colors {
	BLACK,
//	BLUE,
	WHITE,
	RED  
}
Comment 1 Philipe Mulet CLA 2005-04-01 11:50:12 EST
Added EnumTest#test097-098.

Support wasn't handling scenario where some case labels could not be resolved.
Comment 2 Philipe Mulet CLA 2005-04-01 11:50:23 EST
Fixed
Comment 3 Frederic Fusier CLA 2005-04-01 11:52:11 EST
I forgot to precise that to get this internal error you need to set compiler
option "Not all enum constants covered on 'switch'" to warning or error...
Comment 4 Olivier Thomann CLA 2005-04-01 13:13:17 EST
Verified in I20050401-1205