Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
I have the following program
class A<T> { <T> T foo(T t) { return t; } } class B { void bar(int x) {} void test() { int x = (new A<String>()).foo(1); } }
Actual behaviour
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: test.groovy: 11: [Static type checking] - Cannot find matching method A#foo(int). Please check if the declared type is correct and if the method exists. @ line 11, column 13. int x = (new A<String>()).foo(1); ^ 1 error
Expected behaviour
Compile successfully
Tested against master