We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 908d3e2 commit a63c6e6Copy full SHA for a63c6e6
crates/red_knot_python_semantic/src/types/infer.rs
@@ -3349,6 +3349,8 @@ impl<'db> TypeInferenceBuilder<'db> {
3349
3350
// Walk up parent scopes looking for a possible enclosing scope that may have a
3351
// 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.
3354
let mut look_up_eagerly = scope.is_eager(db);
3355
for (enclosing_scope_file_id, _) in self.index.ancestor_scopes(file_scope_id).skip(1) {
3356
// Lazy scopes are "sticky": once we see a lazy scope we stop doing lookups
0 commit comments