From b3e7f074e9a5b74016aa02ea66bd47a60efd9c49 Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Thu, 3 Jul 2025 15:46:35 +0200 Subject: [PATCH] Forgot the fix... --- src/compiler/sema_expr.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/compiler/sema_expr.c b/src/compiler/sema_expr.c index 4132dbf4a..5874aba56 100644 --- a/src/compiler/sema_expr.c +++ b/src/compiler/sema_expr.c @@ -2867,6 +2867,12 @@ EXIT: SEMA_NOTE(decl, "The macro was declared here."); return false; } + if (call_expr->type == type_untypedlist) + { + SEMA_ERROR(call_expr, "The macro returns an untyped list, but the macro did not evaluate to a constant. The macro needs to explicitly cast the return value to the expected type."); + SEMA_NOTE(decl, "The macro was declared here."); + return false; + } } return true; EXIT_FAIL: