Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
This bug is a regression.
I have the following program:
class A<T, Y> { B<Y> f; A(B<Y> x, T y) {} } class B<T> { void m(T x) {} } class Test { <T extends Number> void test() { def x = new B<T>(); new A<>(x, "").f.m((T) null); } }
Actual behavior
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: test.groovy: 13: [Static type checking] - Cannot find matching method B#m(T). Please check if the declared type is correct and if the method exists. @ line 13, column 5. new A<>(x, "").f.m((T) null); ^ 1 error
Expected behaviour
Compile successfully
Tested against master (commit: a976ecdee1f17f7fafc55767de2d857c44d44697)
Attachments
Issue Links
- relates to
-
GROOVY-10662 Fail to substitute type variable when encountering conflicting type parameter with a bound
- Closed