[ https://issues.apache.org/jira/browse/GROOVY-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15307206#comment-15307206 ]
Paul King commented on GROOVY-7846: ----------------------------------- PR merged - thanks! > A trait that defines a static method that uses generic return types throws > "BUG! Type is null" > ---------------------------------------------------------------------------------------------- > > Key: GROOVY-7846 > URL: https://issues.apache.org/jira/browse/GROOVY-7846 > Project: Groovy > Issue Type: Bug > Affects Versions: 2.4.6 > Reporter: Graeme Rocher > Fix For: 2.4.7 > > Attachments: groovy-trait-generics.zip > > > If you have a trait that defines a method such as: > {code} > static <T> T withClient(MyTrait myTrait, @DelegatesTo(MyTrait) Closure<T> > callable ) { > // no-op > } > {code} > Compilation will fail with: > {code} > BUG! Type is null. Most probably you let a transform reuse existing > ClassNodes with generics information, that is now used in a wrong context. > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)