| ... | ... | @@ -2702,13 +2702,17 @@ pub fn updateDeclExports( |
| 2702 | 2702 | |
| 2703 | 2703 | self.resolveGlobalSymbol(sym_loc) catch |err| switch (err) { |
| 2704 | 2704 | error.MultipleSymbolDefinitions => { |
| 2705 | | _ = try module.failed_exports.put(module.gpa, exp, try Module.ErrorMsg.create( |
| 2706 | | gpa, |
| 2707 | | decl.srcLoc(), |
| 2708 | | \\LinkError: symbol '{s}' defined multiple times |
| 2709 | | , |
| 2710 | | .{exp_name}, |
| 2711 | | )); |
| 2705 | // TODO: this needs rethinking |
| 2706 | const global = self.getGlobal(exp_name).?; |
| 2707 | if (sym_loc.sym_index != global.sym_index and global.file != null) { |
| 2708 | _ = try module.failed_exports.put(module.gpa, exp, try Module.ErrorMsg.create( |
| 2709 | gpa, |
| 2710 | decl.srcLoc(), |
| 2711 | \\LinkError: symbol '{s}' defined multiple times |
| 2712 | , |
| 2713 | .{exp_name}, |
| 2714 | )); |
| 2715 | } |
| 2712 | 2716 | }, |
| 2713 | 2717 | else => |e| return e, |
| 2714 | 2718 | }; |