From c8f60b2e2f15713754ac4b0911a7d13b6057264d Mon Sep 17 00:00:00 2001 From: Noam Preil Date: Fri, 26 Jun 2020 04:36:17 -0400 Subject: Stage2: handle missing function names --- test/stage2/compile_errors.zig | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'test') 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; -- cgit v1.2.3