Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0-beta-5
-
Fix Version/s: 1.0-beta-10
-
Component/s: class generator
-
Labels:None
-
Number of attachments :
Description
class MyClass {
f(String s, int i1, int i2)
f(String s, long l1, long l2)
{ println "long" }static main(args)
{ f("hello", 1, 2) }}
produces:
Exception in thread "main" java.lang.VerifyError: (class: MyClass, method: f signature: (Ljava/lang/String;JJ)Ljava/lang/Object
Register pair 3/4 contains wrong type
Issue Links
- duplicates
-
GROOVY-704
Primitive function arguments cause VerifyError
-
Is this related?
class Test {
{ double variance = ((itemCount * sumOfSquares) - (sum * sum)) / (itemCount * (itemCount - 1)) return Math.sqrt(variance) }double computeStandardDev(long itemCount, long sum, long sumOfSquares)
static main(args)
{ computeStandardDev(1, 2, 3) }}
Produces:
Exception in thread "main" java.lang.VerifyError: (class: Test, method: computeStandardDev signature: (JJJ)D) Register pair 2/3 contains wrong type
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:1655)
at java.lang.Class.getMethod0(Class.java:1901)
at java.lang.Class.getMethod(Class.java:984)
at groovy.lang.GroovyShell.runMainOrTestOrRunnable(GroovyShell.java:257)
at groovy.lang.GroovyShell.run(GroovyShell.java:236)
at groovy.lang.GroovyShell.run(GroovyShell.java:165)
at groovy.ui.GroovyMain.processOnce(GroovyMain.java:385)
at groovy.ui.GroovyMain.run(GroovyMain.java:251)
at groovy.ui.GroovyMain.process(GroovyMain.java:234)
at groovy.ui.GroovyMain.main(GroovyMain.java:136)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.codehaus.classworlds.Launcher.launchStandard(Launcher.java:410)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:344)
at org.codehaus.classworlds.Launcher.main(Launcher.java:461)