Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
I have the following program
class A<T1, T2> { A(A<T2, ? extends T2> y) {} } class Test<T> { void test() { A<Number, T> x = new A<Number, T>((A<T, T>) null); } }
Actual behaviour
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: test.groovy: 7: [Static type checking] - Cannot call A#<init>(A<T, ? extends java.lang.Object>) with arguments [A<T, T>] @ line 7, column 22. A<Number, T> x = new A<Number, T>((A<T, T>) null); ^ 1 error
Expected behaviour
Compile successfully
Tested against master (commit: https://github.com/apache/groovy/commit/936983152430a7c030522126eb9e505c04cfb575)