Commit 6dc35efe49

gracefu <81774659+gracefuu@users.noreply.github.com>
2021-04-07 23:25:29
Sema: fix typo bug for boolean ops (and, or)
1 parent e4a60b6
Changed files (1)
src/Sema.zig
@@ -3833,7 +3833,7 @@ fn zirBoolBr(
     _ = try rhs_block.addBr(src, block_inst, rhs_result);
 
     const tzir_then_body: ir.Body = .{ .instructions = try sema.arena.dupe(*Inst, then_block.instructions.items) };
-    const tzir_else_body: ir.Body = .{ .instructions = try sema.arena.dupe(*Inst, rhs_block.instructions.items) };
+    const tzir_else_body: ir.Body = .{ .instructions = try sema.arena.dupe(*Inst, else_block.instructions.items) };
     _ = try child_block.addCondBr(src, lhs, tzir_then_body, tzir_else_body);
 
     block_inst.body = .{