[core] typecheck/function_check: Fix lookup of defined ids in scope

This commit is contained in:
David Mak 2024-10-07 16:51:37 +08:00
parent 2bb788e4bb
commit 9c6685fa8f
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ impl<'a> Inferencer<'a> {
ExprKind::Name { id, .. } => {
// If `id` refers to a declared symbol, reject this assignment if it is used in the
// context of an (implicit) global variable
if let Some(id_info) = self.defined_identifiers.get(id) {
if let Some(id_info) = defined_identifiers.get(id) {
if matches!(
id_info.source,
DeclarationSource::Global { is_explicit: Some(false) }