From 1b0f3d07cc9f2b6c9b13505d5f0f1d8f9a53536c Mon Sep 17 00:00:00 2001 From: ychenfo Date: Fri, 17 Sep 2021 22:32:13 +0800 Subject: [PATCH] nac3core: top level fix field of funinstance --- nac3core/src/toplevel/composer.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nac3core/src/toplevel/composer.rs b/nac3core/src/toplevel/composer.rs index d6b528cc..b18449d1 100644 --- a/nac3core/src/toplevel/composer.rs +++ b/nac3core/src/toplevel/composer.rs @@ -1208,6 +1208,7 @@ impl TopLevelComposer { result.extend(inst_args.iter().map(|x| x.name.clone())); result }; + let mut calls: HashMap = HashMap::new(); let mut inferencer = Inferencer { top_level: &self.make_top_level_context(), defined_identifiers: identifiers.clone(), @@ -1237,7 +1238,7 @@ impl TopLevelComposer { }, primitives: &self.primitives_ty, virtual_checks: &mut Vec::new(), - calls: &mut HashMap::new(), + calls: &mut calls, }; let fun_body = if let ast::StmtKind::FunctionDef { body, .. } = @@ -1281,7 +1282,7 @@ impl TopLevelComposer { FunInstance { body: fun_body, unifier_id: 0, - calls: HashMap::new(), + calls, subst, }, );