From 9c6685fa8fb50555b98901b224a935878659e95d Mon Sep 17 00:00:00 2001 From: David Mak Date: Mon, 7 Oct 2024 16:51:37 +0800 Subject: [PATCH] [core] typecheck/function_check: Fix lookup of defined ids in scope --- nac3core/src/typecheck/function_check.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nac3core/src/typecheck/function_check.rs b/nac3core/src/typecheck/function_check.rs index 0893adec..ed801a17 100644 --- a/nac3core/src/typecheck/function_check.rs +++ b/nac3core/src/typecheck/function_check.rs @@ -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) }