forked from M-Labs/nac3
[core] typecheck/function_check: Fix lookup of defined ids in scope
This commit is contained in:
parent
2bb788e4bb
commit
9c6685fa8f
|
@ -36,7 +36,7 @@ impl<'a> Inferencer<'a> {
|
||||||
ExprKind::Name { id, .. } => {
|
ExprKind::Name { id, .. } => {
|
||||||
// If `id` refers to a declared symbol, reject this assignment if it is used in the
|
// If `id` refers to a declared symbol, reject this assignment if it is used in the
|
||||||
// context of an (implicit) global variable
|
// 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!(
|
if matches!(
|
||||||
id_info.source,
|
id_info.source,
|
||||||
DeclarationSource::Global { is_explicit: Some(false) }
|
DeclarationSource::Global { is_explicit: Some(false) }
|
||||||
|
|
Loading…
Reference in New Issue