diff options
Diffstat (limited to 'src/Sema.zig')
| -rw-r--r-- | src/Sema.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Sema.zig b/src/Sema.zig index 626624110e..895ac84dd0 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -1461,6 +1461,11 @@ fn zirStoreToBlockPtr(sema: *Sema, block: *Scope.Block, inst: Zir.Inst.Index) In defer tracy.end(); const bin_inst = sema.code.instructions.items(.data)[inst].bin; + if (bin_inst.lhs == .none) { + // This is an elided instruction, but AstGen was not smart enough + // to omit it. + return; + } const ptr = try sema.resolveInst(bin_inst.lhs); const value = try sema.resolveInst(bin_inst.rhs); const ptr_ty = try sema.mod.simplePtrType(sema.arena, value.ty, true, .One); |
