Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
I have the following program
class Foo<X> {} class Test { static void test() { m(false, new Foo<>()); } static <T> void m(T x1, Foo<T> x2) {} }
Actual behavior
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: test.groovy: 6: [Static type checking] - Cannot call <T> Test#m(T, Foo<T>) with arguments [boolean, Foo<T>] @ line 6, column 5. m(false, new Foo<>()); ^ 1 error
Expected behavior
Compile successfully
note: The issues occurs only when the type parameters of class Foo and method m have different names.
Tested against master (commit: d7fa923bed20945074a41c54cce5133cc2ab63a0)