This commit is contained in:
gingerBill
2024-10-08 11:58:28 +01:00
21 changed files with 179 additions and 136 deletions
-5
View File
@@ -8795,11 +8795,6 @@ gb_internal ExprKind check_ternary_if_expr(CheckerContext *c, Operand *o, Ast *n
return kind;
}
if (x.type == nullptr || x.type == t_invalid ||
y.type == nullptr || y.type == t_invalid) {
return kind;
}
bool use_type_hint = type_hint != nullptr && (is_operand_nil(x) || is_operand_nil(y));
convert_to_typed(c, &x, use_type_hint ? type_hint : y.type);
+4 -4
View File
@@ -1225,10 +1225,10 @@ gb_internal lbValue lb_emit_arith(lbProcedure *p, TokenKind op, lbValue lhs, lbV
lbValue d3 = lb_emit_struct_ep(p, res.addr, 3);
if (immediate_type != ft) {
d0 = lb_emit_conv(p, d0, ft);
d1 = lb_emit_conv(p, d1, ft);
d2 = lb_emit_conv(p, d2, ft);
d3 = lb_emit_conv(p, d3, ft);
z0 = lb_emit_conv(p, z0, ft);
z1 = lb_emit_conv(p, z1, ft);
z2 = lb_emit_conv(p, z2, ft);
z3 = lb_emit_conv(p, z3, ft);
}
lb_emit_store(p, d0, z0);