Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.4.7
-
None
Description
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:
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; }
Attachments
Issue Links
- links to