You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2020/07/29 01:45:56 UTC

[groovy] branch master updated: add missing source position

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new e20f6ae  add missing source position
e20f6ae is described below

commit e20f6aea76691723cf875a5cae7bc9d0e1c40064
Author: Paul King <pa...@asert.com.au>
AuthorDate: Wed Jul 29 11:45:46 2020 +1000

    add missing source position
---
 .../java/org/codehaus/groovy/transform/CategoryASTTransformation.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/codehaus/groovy/transform/CategoryASTTransformation.java b/src/main/java/org/codehaus/groovy/transform/CategoryASTTransformation.java
index 511e2cb..c85908d 100644
--- a/src/main/java/org/codehaus/groovy/transform/CategoryASTTransformation.java
+++ b/src/main/java/org/codehaus/groovy/transform/CategoryASTTransformation.java
@@ -194,7 +194,9 @@ public class CategoryASTTransformation implements ASTTransformation, Opcodes {
                         return thisExpression;
                     else {
                         if (!varStack.getLast().contains(ve.getName())) {
-                            return new PropertyExpression(thisExpression, ve.getName());
+                            PropertyExpression transformed = new PropertyExpression(thisExpression, ve.getName());
+                            transformed.setSourcePosition(ve);
+                            return transformed;
                         }
                     }
                 } else if (exp instanceof PropertyExpression) {