From 8c4727f9ab61e4c99ab2a00f5751f9b11d274fbe Mon Sep 17 00:00:00 2001 From: Veikka Tuominen Date: Thu, 5 Jan 2023 14:26:33 +0200 Subject: Sema: remove generic function from `monomorphed_funcs` on any error --- src/Module.zig | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/Module.zig') diff --git a/src/Module.zig b/src/Module.zig index 24047f8798..bf54fc01fd 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -3519,14 +3519,6 @@ pub fn deinit(mod: *Module) void { pub fn destroyDecl(mod: *Module, decl_index: Decl.Index) void { const gpa = mod.gpa; { - if (mod.failed_decls.contains(decl_index)) { - blk: { - const errs = mod.comp.getAllErrorsAlloc() catch break :blk; - for (errs.list) |err| Compilation.AllErrors.Message.renderToStdErr(err, .no_color); - } - // TODO restore test case triggering this panic - @panic("Zig compiler bug: attempted to destroy declaration with an attached error"); - } const decl = mod.declPtr(decl_index); log.debug("destroy {*} ({s})", .{ decl, decl.name }); _ = mod.test_functions.swapRemove(decl_index); -- cgit v1.2.3