stage2: remove redundancy from error message

invalid 'try' outside function scope ->
'try' outside function scope
This commit is contained in:
Jacob G-W 2021-07-11 10:03:47 -04:00
parent 18770721ac
commit b0b9c3c2dc
2 changed files with 2 additions and 2 deletions

View file

@ -4604,7 +4604,7 @@ fn tryExpr(
const astgen = parent_gz.astgen; const astgen = parent_gz.astgen;
const fn_block = astgen.fn_block orelse { const fn_block = astgen.fn_block orelse {
return astgen.failNode(node, "invalid 'try' outside function scope", .{}); return astgen.failNode(node, "'try' outside function scope", .{});
}; };
if (parent_gz.in_defer) return astgen.failNode(node, "'try' not allowed inside defer expression", .{}); if (parent_gz.in_defer) return astgen.failNode(node, "'try' not allowed inside defer expression", .{});

View file

@ -903,7 +903,7 @@ pub fn addCases(ctx: *TestContext) !void {
\\ _ = S; \\ _ = S;
\\} \\}
, ,
&.{":4:13: error: invalid 'try' outside function scope"}, &.{":4:13: error: 'try' outside function scope"},
); );
} }
{ {