[
https://issues.apache.org/jira/browse/GROOVY-7846?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul King resolved GROOVY-7846.
-------------------------------
Resolution: Fixed
Assignee: Paul King
Fix Version/s: 2.4.7
> 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
> Assignee: Paul King
> 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)