authorgravatar for 86775241+ypsvlq@users.noreply.github.comypsvlq <86775241+ypsvlq@users.noreply.github.com> 2023-06-13 08:28:06+01:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2023-06-13 00:28:06-07:00
log387f9568ad0dabd426d382efb45b9c52a4ccc5bb
treef34740a99e8ce4e6b204e3583ea08657913e7257
parent529ef75101e21bd45402c516138343b4770238eb
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Sema: check runtime safety is enabled when unwrapping error


1 files changed, 1 insertions(+), 1 deletions(-)

src/Sema.zig+1-1
...@@ -11912,11 +11912,11 @@ fn maybeErrorUnwrap(sema: *Sema, block: *Block, body: []const Zir.Inst.Index, op...@@ -11912,11 +11912,11 @@ fn maybeErrorUnwrap(sema: *Sema, block: *Block, body: []const Zir.Inst.Index, op
11912 const tags = sema.code.instructions.items(.tag);11912 const tags = sema.code.instructions.items(.tag);
11913 for (body) |inst| {11913 for (body) |inst| {
11914 switch (tags[inst]) {11914 switch (tags[inst]) {
11915 .@"unreachable" => if (!block.wantSafety()) return false,
11915 .save_err_ret_index,11916 .save_err_ret_index,
11916 .dbg_block_begin,11917 .dbg_block_begin,
11917 .dbg_block_end,11918 .dbg_block_end,
11918 .dbg_stmt,11919 .dbg_stmt,
11919 .@"unreachable",
11920 .str,11920 .str,
11921 .as_node,11921 .as_node,
11922 .panic,11922 .panic,