Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.1-rc-1
-
Fix Version/s: 1.1-rc-2
-
Component/s: None
-
Labels:None
-
Environment:GroovyConsole, Windows
-
Number of attachments :
Description
According to "Blackdrags View" (http://blackdragsview.blogspot.com/2007_10_01_archive.html) the following enum definition should be possible in Groovy as of rc-1:
enum E {
A(100),B(200),C(300)
def value
E (v) {
value = v
}
}
When I try this in GroovyConsole, I get a puzzling MultipleCompilationErrorsException:
Exception thrown: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, General error during conversion: org.codehaus.groovy.ast.expr.ConstantExpression cannot be cast to org.codehaus.groovy.ast.expr.ListExpression
I'm not sure if this is really a compilation error or if it's only a misleading message because this kind of enum might not be actually supported.
fixed