File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
crates/red_knot_python_semantic/src/types Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -2715,12 +2715,15 @@ impl<'db> TypeInferenceBuilder<'db> {
2715
2715
false
2716
2716
} ;
2717
2717
2718
+ dbg ! ( name) ;
2719
+
2718
2720
let symbol_from_scope =
2719
2721
|enclosing_scope_file_id : FileScopeId , immediate_nested_scope : Option < FileScopeId > | {
2720
2722
// Class scopes are not visible to nested scopes, and we need to handle global
2721
2723
// scope differently (because an unbound name there falls back to builtins), so
2722
2724
// check only function-like scopes.
2723
2725
let enclosing_scope_id = enclosing_scope_file_id. to_scope_id ( self . db , self . file ) ;
2726
+ dbg ! ( enclosing_scope_id. node( self . db) ) ;
2724
2727
2725
2728
if !enclosing_scope_id. is_function_like ( self . db ) {
2726
2729
return None ;
@@ -2779,6 +2782,7 @@ impl<'db> TypeInferenceBuilder<'db> {
2779
2782
// Walk up parent scopes looking for a possible enclosing scope that may have a
2780
2783
// definition of this name visible to us (would be `LOAD_DEREF` at runtime.)
2781
2784
for ( enclosing_scope_file_id, _) in self . index . ancestor_scopes ( file_scope_id) {
2785
+ dbg ! ( enclosing_scope_file_id) ;
2782
2786
match symbol_from_scope ( enclosing_scope_file_id, immediate_nested_scope) {
2783
2787
Some ( symbol) => return symbol,
2784
2788
None => {
You can’t perform that action at this time.
0 commit comments