From e5821148c6b469a48f536b4cd18f06fd5be20e1f Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 28 Jul 2020 17:25:58 +0200 Subject: Fix build issues in release mode --- src/ast.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/ast.c') diff --git a/src/ast.c b/src/ast.c index f0bb528..297014d 100644 --- a/src/ast.c +++ b/src/ast.c @@ -661,8 +661,8 @@ static void assignmentexpr_resolve(Ast *ast, AstCompilerContext *context) { if(resolved_var->type == NAMED_OBJECT_FUNC_PARAM || LHS_EXPR_IS_CONST(resolved_var->value.lhs_expr)) is_lhs_const = bool_true; } else if(self->lhs_expr->type == AST_BINOP) { - LhsExpr *lhs_expr; - lhs_expr = binop_get_lhs_expr(self->lhs_expr->value.binop); + LhsExpr *lhs_expr = binop_get_lhs_expr(self->lhs_expr->value.binop); + check(lhs_expr); is_lhs_const = LHS_EXPR_IS_CONST(lhs_expr); } @@ -764,7 +764,8 @@ static bool resolve_data_type_equals(AstResolvedType *self, AstResolvedType *oth case RESOLVED_TYPE_FUNC_SIG: return function_signature_equals(self->value.func_sig, other->value.func_sig); } - assert(bool_false); + check(bool_false); + return bool_false; } static bool function_parameter_is_c_vararg(FunctionParameter *self, AstCompilerContext *context) { -- cgit v1.2.3