diff options
| author | Veikka Tuominen <git@vexu.eu> | 2022-07-16 12:22:53 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-16 12:22:53 +0300 |
| commit | b2486fbc5e83cca2ce31a6a16b2ad4ff8df170df (patch) | |
| tree | bd96fb988a0bed8307cdafcbe6eecf1ac8bcfc93 /test/compile_errors.zig | |
| parent | da94227f783ec3c92859c4713b80a668f1183f96 (diff) | |
| parent | cf207df5926c2f303ad92069e44bec51bfa44148 (diff) | |
| download | zig-b2486fbc5e83cca2ce31a6a16b2ad4ff8df170df.tar.gz zig-b2486fbc5e83cca2ce31a6a16b2ad4ff8df170df.zip | |
Merge pull request #12121 from Vexu/span
Stage2 point to error location using spans
Diffstat (limited to 'test/compile_errors.zig')
| -rw-r--r-- | test/compile_errors.zig | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/compile_errors.zig b/test/compile_errors.zig index 1337917323..fe6145cc12 100644 --- a/test/compile_errors.zig +++ b/test/compile_errors.zig @@ -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 { |
