Skip to content

Commit a63c6e6

Browse files
committed
comment
1 parent 908d3e2 commit a63c6e6

File tree

1 file changed

+2
-0
lines changed
  • crates/red_knot_python_semantic/src/types

1 file changed

+2
-0
lines changed

crates/red_knot_python_semantic/src/types/infer.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3349,6 +3349,8 @@ impl<'db> TypeInferenceBuilder<'db> {
33493349

33503350
// Walk up parent scopes looking for a possible enclosing scope that may have a
33513351
// definition of this name visible to us (would be `LOAD_DEREF` at runtime.)
3352+
// Note that we skip the scope containing the use that we are resolving, since we
3353+
// already looked for the symbol there up above.
33523354
let mut look_up_eagerly = scope.is_eager(db);
33533355
for (enclosing_scope_file_id, _) in self.index.ancestor_scopes(file_scope_id).skip(1) {
33543356
// Lazy scopes are "sticky": once we see a lazy scope we stop doing lookups

0 commit comments

Comments
 (0)