mirror of
https://github.com/RustPython/Parser.git
synced 2025-08-02 09:52:34 +00:00
Fix scope change
This commit is contained in:
parent
dcca662432
commit
32232811fb
1 changed files with 0 additions and 5 deletions
|
@ -281,11 +281,6 @@ impl<'a> SymbolTableAnalyzer<'a> {
|
|||
fn analyze_unknown_symbol(&self, symbol: &mut Symbol) {
|
||||
if symbol.is_assigned || symbol.is_parameter {
|
||||
symbol.scope = SymbolScope::Local;
|
||||
} else if !symbol.is_assigned && symbol.is_referenced {
|
||||
// if symbol is referenced in its block, but not assigned to.
|
||||
// https://docs.python.org/3/library/symtable.html?highlight=symtable#symtable.Symbol.is_free
|
||||
symbol.scope = SymbolScope::Unknown;
|
||||
symbol.is_free = true;
|
||||
} else {
|
||||
// Interesting stuff about the __class__ variable:
|
||||
// https://docs.python.org/3/reference/datamodel.html?highlight=__class__#creating-the-class-object
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue