Skip to content

Commit 68af2a1

Browse files
committed
minor fix-ups
1 parent 48283fc commit 68af2a1

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

base/org.eclipse.jdt.groovy.core/src/org/eclipse/jdt/groovy/search/TypeInferencingVisitorWithRequestor.java

-1
Original file line numberDiff line numberDiff line change
@@ -1831,7 +1831,6 @@ public void visitVariableExpression(final VariableExpression node) {
18311831
}
18321832

18331833
scopes.getLast().setCurrentNode(node);
1834-
visitAnnotations(node);
18351834
if (node.getAccessedVariable() == node) {
18361835
// this is a local variable declaration
18371836
visitClassReference(node.getOriginType());

base/org.eclipse.jdt.groovy.core/src/org/eclipse/jdt/groovy/search/VariableScope.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -475,16 +475,14 @@ public int getEnclosingClosureResolveStrategy() {
475475
}
476476

477477
/*package*/ VariableScope getEnclosingClosureScope() {
478-
VariableScope scope = this;
479-
do {
478+
for (VariableScope scope = this; scope != null; scope = scope.parent) {
480479
if (scope.scopeNode instanceof ClosureExpression) {
481480
return scope;
482481
}
483482
if (scope.scopeNode instanceof ClassNode) {
484483
break;
485484
}
486-
} while ((scope = scope.parent) != null);
487-
485+
}
488486
return null;
489487
}
490488

0 commit comments

Comments
 (0)