Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
1.0-JSR-2
-
None
-
None
Description
With the following in X.java:
public class X {
public class Y
}
and the following in mytest.groovy:
def x = new X.Y()
I get:
Caught: groovy.lang.GroovyRuntimeException: failed to invoke constructor: public X$Y(X) with arguments: [] reaso
n: java.lang.IllegalArgumentException: wrong number of arguments
The code is incorrect, either Y should be static or we should use an instance of X in the new(). But the error message could be better.
This is http://jira.codehaus.org/browse/GROOVY-910 with a more appropriate title.