[ 
https://issues.apache.org/jira/browse/GROOVY-7951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

John Wagenleitner resolved GROOVY-7951.
---------------------------------------
       Resolution: Fixed
         Assignee: John Wagenleitner
    Fix Version/s: 2.4.8

Thanks for reporting the issue and for providing a patched version.

> MethodCallExpression.transformExpression does not copy generic types
> --------------------------------------------------------------------
>
>                 Key: GROOVY-7951
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7951
>             Project: Groovy
>          Issue Type: Bug
>          Components: ast builder
>    Affects Versions: 2.4.7
>            Reporter: Eric Milles
>            Assignee: John Wagenleitner
>            Priority: Minor
>             Fix For: 2.4.8
>
>
> org.codehaus.groovy.ast.expr.MethodCallExpression.transformExpression(ExpressionTransformer)
>  is not copying generics info.  Downstream visitors are unable to check 
> generics on static calls like Collections.<String>emptyList().
> My patched version:
> {code:java}
>     public Expression transformExpression(ExpressionTransformer transformer) {
>         MethodCallExpression answer =
>             new MethodCallExpression(transformer.transform(objectExpression), 
> transformer.transform(method), transformer.transform(arguments));
>         answer.setSafe(safe);
>         answer.setSpreadSafe(spreadSafe);
>         answer.setImplicitThis(implicitThis);
>         // GRECLIPSE add
>         answer.setGenericsTypes(genericsTypes);
>         // GRECLIPSE end
>         answer.setMethodTarget(target);
>         answer.setSourcePosition(this);
>         answer.copyNodeMetaData(this);
>         return answer;
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to