Fix is_local

This commit is contained in:
yt2b committed 2022-12-22 23:27:36 +09:00
1 parent 85f65740c0
commit 9c81ce646a
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -150,7 +150,7 @@ impl Symbol {
}
pub fn is_local(&self) -> bool {
self.scope == SymbolScope::Local
matches!(self.scope, SymbolScope::Local | SymbolScope::Cell)
}
pub fn is_bound(&self) -> bool {
+1 -1
View File
@@ -179,7 +179,7 @@ mod symtable {
#[pymethod]
fn is_local(&self) -> bool {
self.symbol.is_local()
self.symbol.is_local() || (self.is_top_scope && self.symbol.is_bound())
}
#[pymethod]