You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Graeme Rocher (JIRA)" <ji...@apache.org> on 2016/05/25 12:49:12 UTC
[jira] [Created] (GROOVY-7846) A trait that defines a static method
that uses generic return types throws "BUG! Type is null"
Graeme Rocher created GROOVY-7846:
-------------------------------------
Summary: 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
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)