aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-09-19 23:50:04 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-09-21 14:48:40 -0700
commitf739ac9c21ad89c07eb04f3aa7fc439f69b4a2fe (patch)
tree14793ecc9d979a83f24f3e70dd410bdaa6fd9093 /src/Module.zig
parentbaea62a8ad019bd7ad52324b932dd7d69683b80a (diff)
downloadzig-f739ac9c21ad89c07eb04f3aa7fc439f69b4a2fe.tar.gz
zig-f739ac9c21ad89c07eb04f3aa7fc439f69b4a2fe.zip
sema: delete dead code
Not sure what that code was supposed to be doing, it doesn't seem to be reachable.
Diffstat (limited to 'src/Module.zig')
-rw-r--r--src/Module.zig13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/Module.zig b/src/Module.zig
index a39d4da6c8..712122f1b4 100644
--- a/src/Module.zig
+++ b/src/Module.zig
@@ -3809,18 +3809,7 @@ fn semaDecl(mod: *Module, decl_index: Decl.Index) !bool {
};
defer sema.deinit();
- if (mod.declIsRoot(decl_index)) {
- const main_struct_inst = Zir.main_struct_inst;
- const struct_type = decl.getOwnedStruct(mod).?;
- assert(struct_type.zir_index == main_struct_inst);
- if (true) @panic("TODO");
- // why did the code used to have this? I don't see how struct_type could have
- // been created already without the analyzeStructDecl logic already called on it.
- //try sema.analyzeStructDecl(decl, main_struct_inst, struct_type);
- decl.analysis = .complete;
- decl.generation = mod.generation;
- return false;
- }
+ assert(!mod.declIsRoot(decl_index));
var block_scope: Sema.Block = .{
.parent = null,