Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
4.0.0-beta-2
-
None
Description
I have the following Groovy program.
@groovy.transform.CompileStatic class Main<I extends B<Character>> { void main() { C<I> x = (C<I>) null x.foo().bar(null) } } class A<I, E extends I> { void bar(E y) {} } class B<T> {} class C<S extends B<Character>> { A<S, ? extends S> foo() { (A<S, ? extends S>) null} }
Actual Behavior
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Main.groovy: 4: [Static type checking] - Cannot call A#bar(B) with arguments [<unknown parameter type>]
@ line 4, column 5.
x.foo().bar(null)
^
1 error
Expected behavior
Compile successfully.
Comment
This should be a regression bug because groovyc 4.0.0-alpha-3 compiles the program successfully
Affected Version
master (commit: e453db968df3753dc6c26d51168b944137c8e4b1)