Correct ternary if expression type determination

This commit is contained in:
gingerBill
2021-10-22 14:37:27 +01:00
parent ef73a284e3
commit c9effb9b9f
4 changed files with 21 additions and 22 deletions
-2
View File
@@ -1728,8 +1728,6 @@ void check_stmt_internal(CheckerContext *ctx, Ast *node, u32 flags) {
Entity *e = pt->results->Tuple.variables[i];
Operand *o = &operands[i];
check_assignment(ctx, o, e->type, str_lit("return statement"));
convert_to_typed(ctx, o, e->type);
if (is_type_untyped(o->type)) {
update_untyped_expr_type(ctx, o->expr, e->type, true);
}