Compilation: point caret in error message at the main token
This commit is contained in:
@@ -174,6 +174,15 @@ pub fn addCases(ctx: *TestContext) !void {
|
||||
});
|
||||
}
|
||||
|
||||
{
|
||||
const case = ctx.obj("missing semicolon at EOF", .{});
|
||||
case.addError(
|
||||
\\const foo = 1
|
||||
, &[_][]const u8{
|
||||
\\:1:14: error: expected ';' after declaration
|
||||
});
|
||||
}
|
||||
|
||||
// TODO test this in stage2, but we won't even try in stage1
|
||||
//ctx.objErrStage1("inline fn calls itself indirectly",
|
||||
// \\export fn foo() void {
|
||||
|
||||
Reference in New Issue
Block a user