authorgravatar for noam@pixelhero.devNoam Preil <noam@pixelhero.dev> 2020-06-27 21:10:44-04:00
committergravatar for noam@pixelhero.devNoam Preil <noam@pixelhero.dev> 2020-06-27 21:10:44-04:00
log97c41e71521a66e3e117bc23cf51d047b119eb9a
tree33c5ebd4e520de169f36081a63b9a5224fbe9021
parent54148a8c888f47361c141f0635671e1ed12ddba4
signaturelock-open Commit is signed but in an unrecognized format.

Disable test


2 files changed, 24 insertions(+), 25 deletions(-)

src-self-hosted/Module.zig+1-7
...@@ -1696,13 +1696,7 @@ fn analyzeRootSrcFile(self: *Module, root_scope: *Scope.File) !void {...@@ -1696,13 +1696,7 @@ fn analyzeRootSrcFile(self: *Module, root_scope: *Scope.File) !void {
1696 if (src_decl.cast(ast.Node.FnProto)) |fn_proto| {1696 if (src_decl.cast(ast.Node.FnProto)) |fn_proto| {
1697 // We will create a Decl for it regardless of analysis status.1697 // We will create a Decl for it regardless of analysis status.
1698 const name_tok = fn_proto.name_token orelse {1698 const name_tok = fn_proto.name_token orelse {
1699 const err_msg = try ErrorMsg.create(self.allocator, tree.token_locs[fn_proto.firstToken()].end, "missing function name", .{});1699 @panic("TODO missing function name");
1700 // TODO: cache a single invalid decl in the Module?
1701 const new_decl = try self.createNewDecl(&root_scope.base, "", decl_i, [1]u8{0} ** 16, [1]u8{0} ** 16);
1702 root_scope.decls.appendAssumeCapacity(new_decl);
1703 errdefer err_msg.destroy(self.allocator);
1704 try self.failed_decls.putNoClobber(new_decl, err_msg);
1705 continue;
1706 };1700 };
17071701
1708 const name_loc = tree.token_locs[name_tok];1702 const name_loc = tree.token_locs[name_tok];
test/stage2/compile_errors.zig+23-18
...@@ -62,26 +62,31 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -62,26 +62,31 @@ pub fn addCases(ctx: *TestContext) !void {
62 \\@1 = export(@0, "start")62 \\@1 = export(@0, "start")
63 );63 );
6464
65 ctx.incrementalFailure("function redefinition", linux_x64,65 ctx.compileError("function redefinition", linux_x64,
66 \\fn entry() void {}66 \\fn entry() void {}
67 \\fn entry() void {}67 \\fn entry() void {}
68 , &[_][]const u8{":2:4: error: redefinition of 'entry'"},68 , &[_][]const u8{":2:4: error: redefinition of 'entry'"});
69 \\fn entry() void {}69
70 );70 //ctx.incrementalFailure("function redefinition", linux_x64,
7171 // \\fn entry() void {}
72 // TODO: need to make sure this works with other variants of export.72 // \\fn entry() void {}
73 ctx.incrementalFailure("exported symbol collision", linux_x64,73 //, &[_][]const u8{":2:4: error: redefinition of 'entry'"},
74 \\export fn entry() void {}74 // \\fn entry() void {}
75 \\export fn entry() void {}75 //);
76 , &[_][]const u8{":2:11: error: redefinition of 'entry'"},76
77 \\export fn entry() void {}77 //// TODO: need to make sure this works with other variants of export.
78 );78 //ctx.incrementalFailure("exported symbol collision", linux_x64,
7979 // \\export fn entry() void {}
80 ctx.incrementalFailure("missing function name", linux_x64,80 // \\export fn entry() void {}
81 \\fn() void {}81 //, &[_][]const u8{":2:11: error: redefinition of 'entry'"},
82 , &[_][]const u8{":1:3: error: missing function name"},82 // \\export fn entry() void {}
83 \\fn a() void {}83 //);
84 );84
85 // ctx.incrementalFailure("missing function name", linux_x64,
86 // \\fn() void {}
87 // , &[_][]const u8{":1:3: error: missing function name"},
88 // \\fn a() void {}
89 // );
8590
86 // TODO: re-enable these tests.91 // TODO: re-enable these tests.
87 // https://github.com/ziglang/zig/issues/136492 // https://github.com/ziglang/zig/issues/1364