Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
1.0-JSR-2
-
None
-
None
Description
Test:
import java.awt.Dimension
def foo(Dimension d){}
foo([100,200] as Dimension) // works
Dimension d = [100,200]
foo([100,200]) // throws MissingMethodException !
Coercion from List to <type> triggers the generic ctor of <type> when used with 'as'
or in assignments. This should also happen on coercions in the method lookup.