Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-beta-5
-
None
-
None
-
JDK1.5 (maybe others), groovy 1.0-beta-5
Description
Following fails:
A.java:
===
class A {
void f(boolean b) {
}
void f(String s) {
}
}
===
a.groovy
===
A.f(null);
===
Invoked as "groovy a.groovy" it fails with
===
Caught: groovy.lang.GroovyRuntimeException: failed to invoke method: org.codehaus.groovy.runtime.ReflectionMetaMethod@80f4cb[name: f params: [boolean] returns: void owner: class A] on: class A with arguments: [null] reason: java.lang.IllegalArgumentException
groovy.lang.GroovyRuntimeException: failed to invoke method: org.codehaus.groovy.runtime.ReflectionMetaMethod@80f4cb[name: f params: [boolean] returns: void owner: class A] on: class A with arguments: [null] reason: java.lang.IllegalArgumentException
at groovy.lang.MetaClass.doMethodInvoke(MetaClass.java:1075)
...
===
A.f((String) null) should have been called.