Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-beta-4
-
None
-
None
-
mac os x (panther) beta-4 with latest snapshot jar, jdk 1.4.2
Description
Running either of these code fragments causes the error shown:
import java.awt.Color;
int i = 1;
Color c = new Color(i, i, i);
import java.awt.Color;
Color c = new Color(1, 2, 3);
Caught: groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method: <init>. Cannot resolve which method to invoke due to overlapping prototypes between: [float, float, float] and: [int, int, int]
groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method: <init>. Cannot resolve which method to invoke due to overlapping prototypes between: [float, float, float] and: [int, int, int]
at groovy.lang.MetaClass.checkForInvalidOverloading(MetaClass.java:1282)
at groovy.lang.MetaClass.chooseMostSpecificParams(MetaClass.java:1256)
at groovy.lang.MetaClass.chooseMethod(MetaClass.java:1187)
at groovy.lang.MetaClass.invokeConstructor(MetaClass.java:405)
at org.codehaus.groovy.runtime.Invoker.invokeConstructorOf(Invoker.java:159)
at org.codehaus.groovy.runtime.InvokerHelper.invokeConstructorOf(InvokerHelper.java:133)
at test.run(test.groovy:4)