Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
1.6-rc-1
-
None
-
None
-
XP, cygwin,
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode)
Description
In 1.6 RC1 it seems to no longer be possible for an enum constructor to take more than one parameter. This works fine in 1.5.7:
enum Foo {
A(1,2),
B(3,4)
Foo(int xx, int yy)
{ x=xx y=yy } public int x
public int y
}
Foo.A.x
gives:
Exception thrown: null
java.lang.ExceptionInInitializerError
at ConsoleScript38.class$(ConsoleScript38)
at ConsoleScript38.$get$$class$Foo(ConsoleScript38)
at ConsoleScript38.run(ConsoleScript38:14)
Caused by: groovy.lang.GroovyRuntimeException: Could not find matching constructor for: Foo(java.lang.String, java.lang.Integer, java.util.ArrayList)
at Foo.$INIT(ConsoleScript38)
at Foo.<clinit>(ConsoleScript38:3)
... 3 more