Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
@groovy.transform.CompileStatic class TestFails<T extends Comparable> { List<T> x static <M extends Comparable> TestFails<M> select(List<M> x) { new TestFails<M>(x: x) } }
Error:(9, 22) Groovyc: [Static type checking] - Cannot assign value of type java.util.List <M> to variable of type java.util.List <T>
@groovy.transform.CompileStatic class TestWorks<T extends Comparable> { List<T> x static <M extends Comparable> TestWorks<M> select(List<M> x) { new TestWorks<M>() } }