forked from M-Labs/nac3
nac3core: top level fix field of funinstance
This commit is contained in:
parent
ed5dfd4100
commit
1b0f3d07cc
|
@ -1208,6 +1208,7 @@ impl TopLevelComposer {
|
||||||
result.extend(inst_args.iter().map(|x| x.name.clone()));
|
result.extend(inst_args.iter().map(|x| x.name.clone()));
|
||||||
result
|
result
|
||||||
};
|
};
|
||||||
|
let mut calls: HashMap<CodeLocation, CallId> = HashMap::new();
|
||||||
let mut inferencer = Inferencer {
|
let mut inferencer = Inferencer {
|
||||||
top_level: &self.make_top_level_context(),
|
top_level: &self.make_top_level_context(),
|
||||||
defined_identifiers: identifiers.clone(),
|
defined_identifiers: identifiers.clone(),
|
||||||
|
@ -1237,7 +1238,7 @@ impl TopLevelComposer {
|
||||||
},
|
},
|
||||||
primitives: &self.primitives_ty,
|
primitives: &self.primitives_ty,
|
||||||
virtual_checks: &mut Vec::new(),
|
virtual_checks: &mut Vec::new(),
|
||||||
calls: &mut HashMap::new(),
|
calls: &mut calls,
|
||||||
};
|
};
|
||||||
|
|
||||||
let fun_body = if let ast::StmtKind::FunctionDef { body, .. } =
|
let fun_body = if let ast::StmtKind::FunctionDef { body, .. } =
|
||||||
|
@ -1281,7 +1282,7 @@ impl TopLevelComposer {
|
||||||
FunInstance {
|
FunInstance {
|
||||||
body: fun_body,
|
body: fun_body,
|
||||||
unifier_id: 0,
|
unifier_id: 0,
|
||||||
calls: HashMap::new(),
|
calls,
|
||||||
subst,
|
subst,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue