aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-08-13 14:52:27 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-08-13 14:52:27 -0400
commitaaac5dff28b2fa4835dd9a3a352f274069a7b432 (patch)
tree23463efc54ee6801d13c310b1ef97aa8e8660025
parent32a6a5ce37499adb7a88b81d9832639c53ecf58b (diff)
Integers can have heap memory
-rw-r--r--types.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/types.c b/types.c
index 04c87225..a55395be 100644
--- a/types.c
+++ b/types.c
@@ -211,6 +211,7 @@ bool has_heap_memory(type_t *t)
case TableType: return true;
case SetType: return true;
case PointerType: return true;
+ case IntType: return (Match(t, IntType)->bits == 0);
case StructType: {
for (arg_t *field = Match(t, StructType)->fields; field; field = field->next) {
if (has_heap_memory(field->type))