Skip to content

Commit

Permalink
Improve error message when incorrectly using Type as an rvalue.
Browse files Browse the repository at this point in the history
  • Loading branch information
lerno committed Nov 9, 2024
1 parent 165ff32 commit f15b658
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/sema_expr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f15b658

Please sign in to comment.