nac3core: fixed weird type inference error

This commit is contained in:
pca006132 2021-11-27 20:27:46 +08:00
parent 0ae1fe82b4
commit 7ee82de312
1 changed files with 5 additions and 5 deletions

View File

@ -195,7 +195,7 @@ impl TopLevelComposer {
signature: primitives.1.add_ty(TypeEnum::TFunc(RefCell::new(FunSignature {
args: vec![FuncArg { name: "_".into(), ty: num_ty.0, default_value: None }],
ret: float,
vars: var_map,
vars: var_map.clone(),
}))),
var_id: Default::default(),
instance_to_symbol: Default::default(),
@ -398,7 +398,7 @@ impl TopLevelComposer {
signature: primitives.1.add_ty(TypeEnum::TFunc(RefCell::new(FunSignature {
args: vec![FuncArg { name: "_".into(), ty: num_ty.0, default_value: None }],
ret: primitives.0.bool,
vars: Default::default(),
vars: var_map,
}))),
var_id: Default::default(),
instance_to_symbol: Default::default(),