Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
I have the following program
class A<T extends Number> { A(String x) {} } class B { void m(A<Integer> x) {} } class Test { void test() { B x = new B(); x.m(new A<>("")); } }
Actual behaviour
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: test.groovy: 14: [Static type checking] - Cannot call B#m(A<java.lang.Integer>) with arguments [A<# extends java.lang.Number>] @ line 14, column 5. x.m(new A<>("")); ^ 1 error
Expected behaviour
Compile successfully
Tested against master (https://github.com/apache/groovy/commit/cf2f77fb033a10d36c4db3a7ff07a2b04631afcf)