Skip to content

Commit

Permalink
minor fix-ups
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-milles committed Apr 14, 2020
1 parent 48283fc commit 68af2a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1831,7 +1831,6 @@ public void visitVariableExpression(final VariableExpression node) {
}

scopes.getLast().setCurrentNode(node);
visitAnnotations(node);
if (node.getAccessedVariable() == node) {
// this is a local variable declaration
visitClassReference(node.getOriginType());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,16 +475,14 @@ public int getEnclosingClosureResolveStrategy() {
}

/*package*/ VariableScope getEnclosingClosureScope() {
VariableScope scope = this;
do {
for (VariableScope scope = this; scope != null; scope = scope.parent) {
if (scope.scopeNode instanceof ClosureExpression) {
return scope;
}
if (scope.scopeNode instanceof ClassNode) {
break;
}
} while ((scope = scope.parent) != null);

}
return null;
}

Expand Down

0 comments on commit 68af2a1

Please sign in to comment.