[ https://issues.apache.org/jira/browse/GROOVY-10464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles updated GROOVY-10464: --------------------------------- Fix Version/s: 3.0.10 > Wrong cast for type parameter in generated stubs > ------------------------------------------------ > > Key: GROOVY-10464 > URL: https://issues.apache.org/jira/browse/GROOVY-10464 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler > Affects Versions: 3.0.9, 4.0.0 > Reporter: Eric Milles > Assignee: Eric Milles > Priority: Major > Fix For: 3.0.10, 5.0.0-alpha-1 > > > Consider the following: > {code:groovy} > abstract class A<T> { > A(Class<T> t) { > } > } > class C extends A<E> { > C() { > super(E) // stubgen: "super((Class<T>)null);" > } > } > enum E { > } > {code} > When class C is used by java sources, the joint compiler / stub generator > creates an error for the java source. I was only able to work around this by > changing "Class<T>" to "Class" which is no longer type-safe. In the case of > the example given in the comments of GROOVY-10122 where the type parameter T > is the type of the constructor parameter, it would need to be changed to > Object. -- This message was sent by Atlassian Jira (v8.20.1#820001)