Bug 95703 - 3.1:tct 125- Clarification for translation
Summary: 3.1:tct 125- Clarification for translation
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 RC1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-18 00:23 EDT by Cam-Thu Le CLA
Modified: 2005-05-27 10:55 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cam-Thu Le CLA 2005-05-18 00:23:57 EDT
In the 
eclipse\plugins\org.eclipse.jdt.core\jdtcore_jar\org\eclipse\jdt\internal\compi
ler\problem\messages.properties, 
Line 534, 
"The field {0}.{1} cannot be referenced from an enum case label; only enum 
constants can be used in enum switch." 

Please advise the meaning of "enum switch". 
Thank you very much.
Comment 1 Philipe Mulet CLA 2005-05-18 04:33:17 EDT
In JLS3, switch can be performed on enum values (as opposed to just int values
up until). 
e.g. enum Color { BLUE, WHITE, RED }
     ...
     void foo(Color c) {
       switch(c) {
         case BLUE : ...
         case WHITE : ...
       }
     }

So when a switch perform on an enum, we say "enum switch".

This particular error message arises when some user code tries to mix int
constants and enum constants in switch case label (where value is of enum type).
Comment 2 Philipe Mulet CLA 2005-05-19 18:28:27 EDT
Ok to close?
Comment 3 Philipe Mulet CLA 2005-05-24 11:55:13 EDT
fixed
Comment 4 Philipe Mulet CLA 2005-05-24 19:28:16 EDT
fixed
Comment 5 Maxime Daniel CLA 2005-05-27 10:44:11 EDT
Verified on build I20050527-0010.