diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2023-09-21 23:33:04 +0100 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-09-21 16:27:52 -0700 |
| commit | edfada4317760a152ad9c36b39f5a2e68eeaebf8 (patch) | |
| tree | 02899fc68c17e8a52779e38b87aa593c392e2416 /src/Sema.zig | |
| parent | 55bc8a7fa9b820766df2e7625afdd7e88863cc96 (diff) | |
| download | zig-edfada4317760a152ad9c36b39f5a2e68eeaebf8.tar.gz zig-edfada4317760a152ad9c36b39f5a2e68eeaebf8.zip | |
Sema: mark transitive failure when @import refers to a failed file
Diffstat (limited to 'src/Sema.zig')
| -rw-r--r-- | src/Sema.zig | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/Sema.zig b/src/Sema.zig index a77069f8ec..ca5b692da1 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -5800,9 +5800,7 @@ fn zirCImport(sema: *Sema, parent_block: *Block, inst: Zir.Inst.Index) CompileEr try mod.semaFile(result.file); const file_root_decl_index = result.file.root_decl.unwrap().?; - const file_root_decl = mod.declPtr(file_root_decl_index); - try mod.declareDeclDependency(sema.owner_decl_index, file_root_decl_index); - return Air.internedToRef(file_root_decl.val.toIntern()); + return sema.analyzeDeclVal(parent_block, src, file_root_decl_index); } fn zirSuspendBlock(sema: *Sema, parent_block: *Block, inst: Zir.Inst.Index) CompileError!Air.Inst.Ref { @@ -13036,9 +13034,7 @@ fn zirImport(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air. }; try mod.semaFile(result.file); const file_root_decl_index = result.file.root_decl.unwrap().?; - const file_root_decl = mod.declPtr(file_root_decl_index); - try mod.declareDeclDependency(sema.owner_decl_index, file_root_decl_index); - return Air.internedToRef(file_root_decl.val.toIntern()); + return sema.analyzeDeclVal(block, operand_src, file_root_decl_index); } fn zirEmbedFile(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air.Inst.Ref { |
