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