diff options
| author | Noam Preil <pleasantatk@gmail.com> | 2020-06-26 04:36:17 -0400 |
|---|---|---|
| committer | Noam Preil <pleasantatk@gmail.com> | 2020-06-26 04:36:17 -0400 |
| commit | c8f60b2e2f15713754ac4b0911a7d13b6057264d (patch) | |
| tree | ebd186d28320ceae0997cdb8b63e8af07bdc2b02 /test | |
| parent | 6510888039baaa0058a7e2bade2750569af1abbd (diff) | |
| download | zig-c8f60b2e2f15713754ac4b0911a7d13b6057264d.tar.gz zig-c8f60b2e2f15713754ac4b0911a7d13b6057264d.zip | |
Stage2: handle missing function names
Diffstat (limited to 'test')
| -rw-r--r-- | test/stage2/compile_errors.zig | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/stage2/compile_errors.zig b/test/stage2/compile_errors.zig index f7766abcef..1184048cbb 100644 --- a/test/stage2/compile_errors.zig +++ b/test/stage2/compile_errors.zig @@ -86,12 +86,18 @@ pub fn addCases(ctx: *TestContext) !void { \\export fn entry() void {} ); } + { + var case = ctx.obj("missing function name", linux_x64); + case.addError( + \\fn() void {} + , &[_][]const u8{":1:3: error: missing function name"}); + case.compiles( + \\fn a() void {} + ); + } // TODO: re-enable these tests. // https://github.com/ziglang/zig/issues/1364 - // ctx.addError("Missing function name", linux_x64, .Zig, - // \\fn() void {} - // , &[_][]const u8{":1:3: error: missing function name"}); //ctx.testCompileError( // \\comptime { // \\ return; |
