not to rewrite RESOLUTION_SCOPE for references

(different scope can appear because of cached info for calls)
This commit is contained in:
Svetlana Isakova
2012-06-07 17:12:12 +04:00
parent 3d2021a132
commit c40cd03a08
@@ -149,7 +149,7 @@ public class ExpressionTypingVisitorDispatcher extends JetVisitor<JetType, Expre
result = null;
}
if (!context.trace.get(BindingContext.PROCESSED, expression)) {
if (!context.trace.get(BindingContext.PROCESSED, expression) && !(expression instanceof JetReferenceExpression)) {
context.trace.record(BindingContext.RESOLUTION_SCOPE, expression, context.scope);
}
context.trace.record(BindingContext.PROCESSED, expression);