Skip to content

Commit 7dcbabe

Browse files
authored
std.zig.Parse: Fix assertion (#16500)
The assert was copied from a few lines above without updating the target variable.
1 parent a03fee4 commit 7dcbabe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/std/zig/Parse.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3818,7 +3818,7 @@ fn parseIf(p: *Parse, comptime bodyParseFn: fn (p: *Parse) Error!Node.Index) !No
38183818
});
38193819
_ = try p.parsePayload();
38203820
const else_expr = try bodyParseFn(p);
3821-
assert(then_expr != 0);
3821+
assert(else_expr != 0);
38223822

38233823
return p.addNode(.{
38243824
.tag = .@"if",

0 commit comments

Comments
 (0)