Use a fresh var where it turns out it's needed

This commit is contained in:
Richard Feldman 2025-12-04 21:42:56 -05:00
parent a98a981b4e
commit 5262438d2e
No known key found for this signature in database

View file

@ -5171,7 +5171,7 @@ pub fn canonicalizeExpr(
.patterns = ok_branch_pat_span,
.value = ok_lookup_idx,
.guard = null,
.redundant = undefined, // currently unused, but reserved for future exhaustiveness checking
.redundant = try self.env.types.fresh(),
},
region,
);
@ -5245,7 +5245,7 @@ pub fn canonicalizeExpr(
.patterns = err_branch_pat_span,
.value = return_expr_idx,
.guard = null,
.redundant = undefined, // currently unused, but reserved for future exhaustiveness checking
.redundant = try self.env.types.fresh(),
},
region,
);
@ -5259,7 +5259,7 @@ pub fn canonicalizeExpr(
const match_expr = Expr.Match{
.cond = can_cond.idx,
.branches = branches_span,
.exhaustive = undefined, // currently unused, but reserved for future exhaustiveness checking
.exhaustive = try self.env.types.fresh(),
};
const expr_idx = try self.env.addExpr(CIR.Expr{ .e_match = match_expr }, region);
@ -5636,7 +5636,7 @@ pub fn canonicalizeExpr(
.patterns = branch_pat_span,
.value = value_idx,
.guard = null,
.redundant = undefined, // currently unused, but reserved for future exhaustiveness checking
.redundant = try self.env.types.fresh(),
},
region,
);
@ -5656,7 +5656,7 @@ pub fn canonicalizeExpr(
const match_expr = Expr.Match{
.cond = can_cond.idx,
.branches = branches_span,
.exhaustive = undefined, // currently unused, but reserved for future exhaustiveness checking
.exhaustive = try self.env.types.fresh(),
};
const expr_idx = try self.env.addExpr(CIR.Expr{ .e_match = match_expr }, region);