From df8595cd64df94872ebbc62d18931ac50ece761e Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Mon, 10 Oct 2022 14:51:52 +0200 Subject: [PATCH] Fix of bug where using && on a member ref would result in an assert. --- src/compiler/sema_expr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compiler/sema_expr.c b/src/compiler/sema_expr.c index 0b2adf62d..158c88cb3 100644 --- a/src/compiler/sema_expr.c +++ b/src/compiler/sema_expr.c @@ -5413,9 +5413,10 @@ static inline bool sema_expr_analyse_taddr(SemaContext *context, Expr *expr) Expr *inner = expr->unary_expr.expr; if (!sema_analyse_expr(context, inner)) return false; - if (inner->type == type_untypedlist) + if (type_is_invalid_storage_type(inner->type)) { - SEMA_ERROR(expr, "It is not possible to take the address of an untyped list."); + SEMA_ERROR(expr, "It is not possible to take the address from a value of the type %s.", + type_quoted_error_string(inner->type)); return false; } // 2. The type is the resulting type of the expression.