You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2017/02/01 23:19:08 UTC
[jira] [Closed] (GROOVY-7951)
MethodCallExpression.transformExpression does not copy generic types
[ https://issues.apache.org/jira/browse/GROOVY-7951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-7951.
-----------------------------
> 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.15#6346)