Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.5.6
-
None
Description
trait SomeGroovyTrait<D> { List<D> list(D arg) { [arg] } } class SomeGroovyClass implements SomeGroovyTrait<String> { }
Generates a stub like this
... public class SomeGroovyClass implements SomeGroovyTrait<java.lang.String>, groovy.lang.GroovyObject { ... public java.util.List<D> list(D arg) { return (java.util.List<D>)null;} // <== D should be String }
Note that the return type and parameter types use D instead of type String and the generic reference isn't declared in the class either.
Attachments
Issue Links
- is a clone of
-
GROOVY-9031 Traits using generics generate incorrect stub for Properties
- Closed