Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0.9, 4.0.0
-
None
Description
Consider the following:
abstract class A<T> { A(Class<T> t) { } } class C extends A<E> { C() { super(E) // stubgen: "super((Class<T>)null);" } } enum E { }
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.
Attachments
Issue Links
- is a clone of
-
GROOVY-10122 Wrong cast in stubs generated
- Closed