Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
I have the following program
class A<T> { void m(B<T> x, T y) {} } class B<T> {} class Test<X, Y extends X> { void m() { A<Y> x = new A<Y>(); x.m(new B<Y>(), (Y) null); } }
Actual behaviour
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: test.groovy: 11: [Static type checking] - Cannot call A#m(B<Y extends X>, Y) with arguments [B<Y>, Y] @ line 11, column 5. x.m(new B<Y>(), (Y) null); ^ 1 error
Expected behaviour
Compile successfully
Tested against master.