Skip to content

Commit efbab03

Browse files
committed
Fix backward compatibility issue
Grails is using the method
1 parent ceea40f commit efbab03

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/java/org/codehaus/groovy/classgen/VariableScopeVisitor.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,13 @@ private void checkVariableContextAccess(final Variable variable, final Expressio
346346
}
347347

348348
//--------------------------------------------------------------------------
349+
/**
350+
* Sets the current class node context.
351+
*/
352+
public void prepareVisit(ClassNode node) {
353+
currentClass = node;
354+
currentScope.setClassScope(node);
355+
}
349356

350357
@Override
351358
public void visitClass(final ClassNode node) {

0 commit comments

Comments
 (0)