authorgravatar for jacoblevgw@gmail.comJacob G-W <jacoblevgw@gmail.com> 2021-07-11 10:03:47-04:00
committergravatar for jacoblevgw@gmail.comJacob G-W <jacoblevgw@gmail.com> 2021-07-11 10:03:47-04:00
logb0b9c3c2dc4e55609db44dc0564795b7e2ed1b34
tree01f083152164cce7d97eb7f52de3e324eb118932
parent18770721ac919abd8d4dc6d117a6798a462106be

stage2: remove redundancy from error message

invalid 'try' outside function scope -> 'try' outside function scope

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

src/AstGen.zig+1-1
......@@ -4604,7 +4604,7 @@ fn tryExpr(
46044604 const astgen = parent_gz.astgen;
46054605
46064606 const fn_block = astgen.fn_block orelse {
4607 return astgen.failNode(node, "invalid 'try' outside function scope", .{});
4607 return astgen.failNode(node, "'try' outside function scope", .{});
46084608 };
46094609
46104610 if (parent_gz.in_defer) return astgen.failNode(node, "'try' not allowed inside defer expression", .{});
test/cases.zig+1-1
......@@ -903,7 +903,7 @@ pub fn addCases(ctx: *TestContext) !void {
903903 \\ _ = S;
904904 \\}
905905 ,
906 &.{":4:13: error: invalid 'try' outside function scope"},
906 &.{":4:13: error: 'try' outside function scope"},
907907 );
908908 }
909909 {