Make diverging or_else inherit lhs type

This commit is contained in:
misomosi
2026-07-02 13:22:03 -04:00
parent e276ce552b
commit aa53466cb6

View File

@@ -9899,6 +9899,7 @@ gb_internal ExprKind check_or_else_expr(CheckerContext *c, Operand *o, Ast *node
if (is_diverging_expr(y.expr)) {
// Allow
y.mode = Addressing_Value;
y.type = x.type;
y_is_diverging = true;
} else {
error_operand_no_value(&y);