diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 9efd16af4..06784a7f3 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -4470,7 +4470,10 @@ gb_internal void convert_to_typed(CheckerContext *c, Operand *operand, Type *tar if (is_exact_value_zero(operand->value) && (operand->value.kind == ExactValue_Integer || operand->value.kind == ExactValue_Float)) { - update_untyped_expr_value(c, operand->expr, empty_exact_value); + operand->mode = Addressing_Value; + target_type = t_untyped_nil; + operand->value = empty_exact_value; + update_untyped_expr_value(c, operand->expr, operand->value); break; } }