[ https://issues.apache.org/jira/browse/GROOVY-7951?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15558314#comment-15558314 ]
Shil Sinha commented on GROOVY-7951: ------------------------------------ [~bigehokie] do you have an example which fails without your change? > 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 > Priority: Minor > > 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)