Commit 7dcbabef51

Zachary Raineri <zach@raineri.software>
2023-07-24 02:18:02
std.zig.Parse: Fix assertion (#16500)
The assert was copied from a few lines above without updating the target variable.
1 parent a03fee4
Changed files (1)
lib
std
lib/std/zig/Parse.zig
@@ -3818,7 +3818,7 @@ fn parseIf(p: *Parse, comptime bodyParseFn: fn (p: *Parse) Error!Node.Index) !No
     });
     _ = try p.parsePayload();
     const else_expr = try bodyParseFn(p);
-    assert(then_expr != 0);
+    assert(else_expr != 0);
 
     return p.addNode(.{
         .tag = .@"if",