Bug 97396

Summary: Internal compiler error related to switch statement
Product: [Eclipse Project] JDT Reporter: Petr Lindovsky <lindovsky>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: Olivier_Thomann
Version: 3.1   
Target Milestone: 3.1 RC2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Build log none

Description Petr Lindovsky CLA 2005-05-31 04:14:20 EDT
I'm getting an "Internal compiler error" (see attachment) with 3.1 RC1 when 
compiling a file with the following switch statement over enum values:

switch (tableConfigType) {
case AGGREGATION:
	return AggregationDefConfigurationManager.getManagerFor(url);
case COLUMN:			
    return ColumnDefConfigurationManager.getManagerFor(url);
case FILTER:
    return FilterDefConfigurationManager.getManagerFor(url);
case HIGHLIGHTING:
    return HighlightingDefConfigurationManager.getManagerFor(url);
case SORTING:
    return SortingDefConfigurationManager.getManagerFor(url);
default:
	assert false;
}

When I replace this with the following, the compilation finishes correctly:

if (tableConfigType == TableConfigType.AGGREGATION) {
	return AggregationDefConfigurationManager.getManagerFor(url);
} else if (tableConfigType == TableConfigType.COLUMN) {
    return ColumnDefConfigurationManager.getManagerFor(url);
} else if (tableConfigType == TableConfigType.FILTER) {
    return FilterDefConfigurationManager.getManagerFor(url);
} else if (tableConfigType == TableConfigType.HIGHLIGHTING) {
    return HighlightingDefConfigurationManager.getManagerFor(url);
} else if (tableConfigType == TableConfigType.SORTING) {
    return SortingDefConfigurationManager.getManagerFor(url);
} else {
	assert false;
}
Comment 1 Petr Lindovsky CLA 2005-05-31 04:17:04 EDT
Created attachment 22007 [details]
Build log
Comment 2 Philipe Mulet CLA 2005-05-31 04:51:40 EDT
Olivier - pls double check

*** This bug has been marked as a duplicate of 97247 ***
Comment 3 Olivier Thomann CLA 2005-05-31 08:16:51 EDT
Indeed. This is a duplicate.
Could you please try next build and confirm this is fixing this issue?
Comment 4 Petr Lindovsky CLA 2005-06-02 02:27:09 EDT
I can confirm that this problem is fixed in eclipse-SDK-N20050602-0010-win32.
Comment 5 Frederic Fusier CLA 2005-06-08 03:19:22 EDT
Thanks for having verified it