core/type_inferencer: Fix missing lowering for some builtin TVars

This commit is contained in:
David Mak 2024-05-09 15:01:08 +08:00
parent 876e6ea7b8
commit a777099ea8

View File

@ -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() {