From f15b6588f11b4194ed802d53bd292ad70d8b67ec Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Sat, 9 Nov 2024 02:36:33 +0100 Subject: [PATCH] Improve error message when incorrectly using Type as an rvalue. --- src/compiler/sema_expr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/sema_expr.c b/src/compiler/sema_expr.c index 68ff42329..2031d377b 100644 --- a/src/compiler/sema_expr.c +++ b/src/compiler/sema_expr.c @@ -9350,7 +9350,7 @@ static inline bool sema_cast_rvalue(SemaContext *context, Expr *expr) sema_expr_flatten_const_ident(expr->access_expr.parent); return true; case EXPR_TYPEINFO: - RETURN_SEMA_ERROR(expr, "A type must be followed by either (...) or '.'."); + RETURN_SEMA_ERROR(expr, "A type must be followed by either (...) or '.' unless passed as a macro type argument or assigned to a compile time type variable."); case EXPR_CT_IDENT: if (!sema_cast_ct_ident_rvalue(context, expr)) return false; break;