diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-06-28 16:35:58 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-06-28 16:36:11 -0700 |
| commit | 6c51c8e131b0bad77f199176dfc186b92768f296 (patch) | |
| tree | 4156a53908162e1ceabc30b1e8fabb364e87b660 /src | |
| parent | 304a58a2515c19cc719f5a517b0016f82117263e (diff) | |
| download | zig-6c51c8e131b0bad77f199176dfc186b92768f296.tar.gz zig-6c51c8e131b0bad77f199176dfc186b92768f296.zip | |
Sema: fix not propagating want_safety in zirBlock
Before this commit, `@setRuntimeSafety()` has no effect inside an if
expression.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Sema.zig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Sema.zig b/src/Sema.zig index 798dc06db1..2d2c303586 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -4478,6 +4478,7 @@ fn zirBlock(sema: *Sema, parent_block: *Block, inst: Zir.Inst.Index) CompileErro .label = &label, .inlining = parent_block.inlining, .is_comptime = parent_block.is_comptime, + .want_safety = parent_block.want_safety, }; defer child_block.instructions.deinit(gpa); |
