diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2024-03-05 08:15:28 +0000 |
|---|---|---|
| committer | mlugg <mlugg@mlugg.co.uk> | 2024-03-06 21:26:38 +0000 |
| commit | e043fe474ffe07d1503c6cb70e01983b8d07a1ba (patch) | |
| tree | a4cfce82b6a4239f2a1d203e211db29345b4c1e3 /src/Sema.zig | |
| parent | 20403ee41d67b02faedbee97a94fc8b9fd3781e0 (diff) | |
| download | zig-e043fe474ffe07d1503c6cb70e01983b8d07a1ba.tar.gz zig-e043fe474ffe07d1503c6cb70e01983b8d07a1ba.zip | |
Fix incorrectly resolved merge conflicts
To be honest, I can't be bothered to figure out which commits these
changes should be in.
Diffstat (limited to 'src/Sema.zig')
| -rw-r--r-- | src/Sema.zig | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Sema.zig b/src/Sema.zig index dba0983739..c3e0d5991e 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -2674,7 +2674,7 @@ fn analyzeAsInt( fn getCaptures(sema: *Sema, block: *Block, extra_index: usize, captures_len: u32) ![]InternPool.CaptureValue { const zcu = sema.mod; const ip = &zcu.intern_pool; - const parent_captures: InternPool.CaptureValue.Slice = zcu.namespacePtr(block.namespace).ty.getCaptures(zcu); + const parent_captures: InternPool.CaptureValue.Slice = zcu.namespacePtr(block.namespace).getType(zcu).getCaptures(zcu); const captures = try sema.arena.alloc(InternPool.CaptureValue, captures_len); @@ -2796,7 +2796,7 @@ fn zirStructDecl( .decl_index = new_decl_index, .file_scope = block.getFileScope(mod), })).toOptional() else .none; - errdefer mod.destroyNamespace(new_namespace_index); + errdefer if (new_namespace_index.unwrap()) |ns| mod.destroyNamespace(ns); if (new_namespace_index.unwrap()) |ns| { const decls = sema.code.bodySlice(extra_index, decls_len); @@ -17268,7 +17268,7 @@ fn zirThis( fn zirClosureGet(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstData) CompileError!Air.Inst.Ref { const mod = sema.mod; const ip = &mod.intern_pool; - const captures = mod.namespacePtr(block.namespace).ty.getCaptures(mod); + const captures = mod.namespacePtr(block.namespace).getType(mod).getCaptures(mod); const src_node: i32 = @bitCast(extended.operand); const src = LazySrcLoc.nodeOffset(src_node); @@ -21787,7 +21787,7 @@ fn reifyUnion( errdefer msg.destroy(gpa); const src_decl = mod.declPtr(block.src_decl); - try sema.explainWhyTypeIsNotExtern(msg, src.toSrcLoc(src_decl, mod), field_ty, .union_field); + try sema.explainWhyTypeIsNotExtern(msg, src_decl.toSrcLoc(src, mod), field_ty, .union_field); try sema.addDeclaredHereNote(msg, field_ty); break :msg msg; @@ -21798,7 +21798,7 @@ fn reifyUnion( errdefer msg.destroy(gpa); const src_decl = mod.declPtr(block.src_decl); - try sema.explainWhyTypeIsNotPacked(msg, src.toSrcLoc(src_decl, mod), field_ty); + try sema.explainWhyTypeIsNotPacked(msg, src_decl.toSrcLoc(src, mod), field_ty); try sema.addDeclaredHereNote(msg, field_ty); break :msg msg; |
