From a777099ea866aaa9f664e903c8c2296b856d02d6 Mon Sep 17 00:00:00 2001 From: David Mak Date: Thu, 9 May 2024 15:01:08 +0800 Subject: [PATCH] core/type_inferencer: Fix missing lowering for some builtin TVars --- nac3core/src/typecheck/type_inferencer/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nac3core/src/typecheck/type_inferencer/mod.rs b/nac3core/src/typecheck/type_inferencer/mod.rs index 72fd2130..cb2e7b43 100644 --- a/nac3core/src/typecheck/type_inferencer/mod.rs +++ b/nac3core/src/typecheck/type_inferencer/mod.rs @@ -855,11 +855,15 @@ impl<'a> Inferencer<'a> { "int32", "float", "bool", + "round", + "round64", "np_isnan", "np_isinf", ].iter().any(|fun_id| id == &(*fun_id).into()) && args.len() == 1 { - let target_ty = if id == &"int32".into() { + let target_ty = if id == &"int32".into() || id == &"round".into() || id == &"floor".into() || id == &"ceil".into() { self.primitives.int32 + } else if id == &"round64".into() || id == &"floor64".into() || id == &"ceil64".into() { + self.primitives.int64 } else if id == &"float".into() { self.primitives.float } else if id == &"bool".into() || id == &"np_isnan".into() || id == &"np_isinf".into() {