Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Program
class A<T1, T2 extends T1> { void foo() { def cls1 = { T2 x -> "" } Closure<T2> cls2 = { T2 x -> x } cls1(cls2((T2) null)) } }
Actual Behavior
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
test.groovy: 5: [Static type checking] - Cannot call closure that accepts [T2] with [T1]
@ line 5, column 9.
cls1(cls2((T2) null))
^1 error
Expected Behavior
Compile successfully