You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2020/06/26 18:09:34 UTC
[groovy] branch GROOVY_3_0_X updated: Fix backward compatibility
issue
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY_3_0_X by this push:
new 9745839 Fix backward compatibility issue
9745839 is described below
commit 9745839e6d9efc59cba58b58eb754f5c405002d1
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sat Jun 27 02:07:54 2020 +0800
Fix backward compatibility issue
Grails is using the method
(cherry picked from commit efbab03a805983d19815843e5cf42c99f03f8955)
---
.../java/org/codehaus/groovy/classgen/VariableScopeVisitor.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/main/java/org/codehaus/groovy/classgen/VariableScopeVisitor.java b/src/main/java/org/codehaus/groovy/classgen/VariableScopeVisitor.java
index 5fb5678..752267f 100644
--- a/src/main/java/org/codehaus/groovy/classgen/VariableScopeVisitor.java
+++ b/src/main/java/org/codehaus/groovy/classgen/VariableScopeVisitor.java
@@ -346,6 +346,13 @@ public class VariableScopeVisitor extends ClassCodeVisitorSupport {
}
//--------------------------------------------------------------------------
+ /**
+ * Sets the current class node context.
+ */
+ public void prepareVisit(ClassNode node) {
+ currentClass = node;
+ currentScope.setClassScope(node);
+ }
@Override
public void visitClass(final ClassNode node) {