Skip to content

Commit f4904b1

Browse files
committed
wip
1 parent 16b63ba commit f4904b1

File tree

1 file changed

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

1 file changed

+4
-0
lines changed

crates/red_knot_python_semantic/src/types/infer.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2715,12 +2715,15 @@ impl<'db> TypeInferenceBuilder<'db> {
27152715
false
27162716
};
27172717

2718+
dbg!(name);
2719+
27182720
let symbol_from_scope =
27192721
|enclosing_scope_file_id: FileScopeId, immediate_nested_scope: Option<FileScopeId>| {
27202722
// Class scopes are not visible to nested scopes, and we need to handle global
27212723
// scope differently (because an unbound name there falls back to builtins), so
27222724
// check only function-like scopes.
27232725
let enclosing_scope_id = enclosing_scope_file_id.to_scope_id(self.db, self.file);
2726+
dbg!(enclosing_scope_id.node(self.db));
27242727

27252728
if !enclosing_scope_id.is_function_like(self.db) {
27262729
return None;
@@ -2779,6 +2782,7 @@ impl<'db> TypeInferenceBuilder<'db> {
27792782
// Walk up parent scopes looking for a possible enclosing scope that may have a
27802783
// definition of this name visible to us (would be `LOAD_DEREF` at runtime.)
27812784
for (enclosing_scope_file_id, _) in self.index.ancestor_scopes(file_scope_id) {
2785+
dbg!(enclosing_scope_file_id);
27822786
match symbol_from_scope(enclosing_scope_file_id, immediate_nested_scope) {
27832787
Some(symbol) => return symbol,
27842788
None => {

0 commit comments

Comments
 (0)