From 398d2cab6988e20c59e7037ff7ef551540339abb Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 5 Oct 2025 17:52:33 -0400 Subject: Fix a bunch of issues with optional types --- src/compile/types.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/compile/types.c') diff --git a/src/compile/types.c b/src/compile/types.c index 58a0260b..2b345b41 100644 --- a/src/compile/types.c +++ b/src/compile/types.c @@ -135,8 +135,8 @@ Text_t compile_type_info(type_t *t) { } case OptionalType: { type_t *non_optional = Match(t, OptionalType)->type; - return Texts("Optional$info(sizeof(", compile_type(non_optional), "), __alignof__(", compile_type(non_optional), - "), ", compile_type_info(non_optional), ")"); + return Texts("Optional$info(", (int64_t)type_size(t), ", ", (int64_t)type_align(t), ", ", + compile_type_info(non_optional), ")"); } case TypeInfoType: return Texts("Type$info(", quoted_text(type_to_text(Match(t, TypeInfoType)->type)), ")"); case MemoryType: return Text("&Memory$info"); -- cgit v1.2.3