Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
This is related to GROOVY-10629, GROOVY-10115, GROOVY-10221
I have the following program
class B<X, Y extends X> { void test() { Closure<String> clos = { X x -> x.toString() } clos((Y) null); } }
Actual behaviour
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
test.groovy: 4: [Static type checking] - Cannot call closure that accepts [X] with [Y]
@ line 4, column 9.
clos((Y) null);
^
1 error
Expected behaviour
Compile successfully
Tested against master (commit: a976ecdee1f17f7fafc55767de2d857c44d44697)