We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 85f6574 commit 9c81ce6Copy full SHA for 9c81ce6
compiler/codegen/src/symboltable.rs
@@ -150,7 +150,7 @@ impl Symbol {
150
}
151
152
pub fn is_local(&self) -> bool {
153
- self.scope == SymbolScope::Local
+ matches!(self.scope, SymbolScope::Local | SymbolScope::Cell)
154
155
156
pub fn is_bound(&self) -> bool {
vm/src/stdlib/symtable.rs
@@ -179,7 +179,7 @@ mod symtable {
179
180
#[pymethod]
181
fn is_local(&self) -> bool {
182
- self.symbol.is_local()
+ self.symbol.is_local() || (self.is_top_scope && self.symbol.is_bound())
183
184
185
0 commit comments