diff options
Diffstat (limited to 'src/ast.c')
-rw-r--r-- | src/ast.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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) { |