iter 22-tidy.4: route 4 matches! sites through is_primitive_name

This commit is contained in:
2026-05-10 04:15:47 +02:00
parent 9523a1cd63
commit 5fd95e4e9f
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -140,7 +140,7 @@ use std::collections::HashMap;
/// == 0`.
fn is_heap_type(t: &Type) -> bool {
match t {
Type::Con { name, .. } => !matches!(name.as_str(), "Int" | "Bool" | "Str" | "Unit"),
Type::Con { name, .. } => !ailang_core::primitives::is_primitive_name(name),
// Type::Var (a polymorphic param) is conservatively heap —
// it could instantiate to a heap type at the call site.
Type::Var { .. } => true,