mirror of
https://github.com/ziglang/zig.git
synced 2025-12-16 03:03:09 +00:00
Sema: check runtime safety is enabled when unwrapping error
This commit is contained in:
parent
529ef75101
commit
387f9568ad
@ -11912,11 +11912,11 @@ fn maybeErrorUnwrap(sema: *Sema, block: *Block, body: []const Zir.Inst.Index, op
|
||||
const tags = sema.code.instructions.items(.tag);
|
||||
for (body) |inst| {
|
||||
switch (tags[inst]) {
|
||||
.@"unreachable" => if (!block.wantSafety()) return false,
|
||||
.save_err_ret_index,
|
||||
.dbg_block_begin,
|
||||
.dbg_block_end,
|
||||
.dbg_stmt,
|
||||
.@"unreachable",
|
||||
.str,
|
||||
.as_node,
|
||||
.panic,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user