Skip to content

Commit 7e69e5e

Browse files
committed
Fix scope change
1 parent 07476a2 commit 7e69e5e

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

compiler/src/symboltable.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -281,11 +281,6 @@ impl<'a> SymbolTableAnalyzer<'a> {
281281
fn analyze_unknown_symbol(&self, symbol: &mut Symbol) {
282282
if symbol.is_assigned || symbol.is_parameter {
283283
symbol.scope = SymbolScope::Local;
284-
} else if !symbol.is_assigned && symbol.is_referenced {
285-
// if symbol is referenced in its block, but not assigned to.
286-
// https://docs.python.org/3/library/symtable.html?highlight=symtable#symtable.Symbol.is_free
287-
symbol.scope = SymbolScope::Unknown;
288-
symbol.is_free = true;
289284
} else {
290285
// Interesting stuff about the __class__ variable:
291286
// https://docs.python.org/3/reference/datamodel.html?highlight=__class__#creating-the-class-object

0 commit comments

Comments
 (0)