stage2: remove redundancy from error message
invalid 'try' outside function scope -> 'try' outside function scope
This commit is contained in:
@@ -4604,7 +4604,7 @@ fn tryExpr(
|
||||
const astgen = parent_gz.astgen;
|
||||
|
||||
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", .{});
|
||||
|
||||
@@ -903,7 +903,7 @@ pub fn addCases(ctx: *TestContext) !void {
|
||||
\\ _ = S;
|
||||
\\}
|
||||
,
|
||||
&.{":4:13: error: invalid 'try' outside function scope"},
|
||||
&.{":4:13: error: 'try' outside function scope"},
|
||||
);
|
||||
}
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user