Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
1.1-rc-1
-
None
-
None
-
Windows 2000
Groovy Version: 1.1-rc-1
JVM: 1.6.0_02-b05
Description
The following code snippet can not be run, but after I used the full name such as Fruit.APPLE, Fruit.ORANGE, Fruit.BANANA, the code can be run successfully.
public enum Fruit { APPLE, ORANGE, BANANA } Fruit f = Fruit.BANANA println f switch (f) { case APPLE: println "Apple" break case ORANGE: println "Orange" break case BANANA: println "Banana" break default: println "Will not reach!" break }