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
1191211912 const tags = sema.code.instructions.items(.tag);
1191311913 for (body) |inst| {
1191411914 switch (tags[inst]) {
11915 .@"unreachable" => if (!block.wantSafety()) return false,
1191511916 .save_err_ret_index,
1191611917 .dbg_block_begin,
1191711918 .dbg_block_end,
1191811919 .dbg_stmt,
11919 .@"unreachable",
1192011920 .str,
1192111921 .as_node,
1192211922 .panic,