From 21cde7ad90a033b775fdf0a5c3477fa289c51ef5 Mon Sep 17 00:00:00 2001 From: mlugg Date: Tue, 16 Jul 2024 19:35:57 +0100 Subject: [PATCH 1/2] Zcu: updateZirRefs typo --- src/Zcu/PerThread.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Zcu/PerThread.zig b/src/Zcu/PerThread.zig index 4c43640843..f8922a37d7 100644 --- a/src/Zcu/PerThread.zig +++ b/src/Zcu/PerThread.zig @@ -443,16 +443,16 @@ pub fn updateZirRefs(pt: Zcu.PerThread) Allocator.Error!void { { var it = new_zir.declIterator(tracked_inst.inst); while (it.next()) |decl_inst| { - const decl_name = old_zir.getDeclaration(decl_inst)[0].name; + const decl_name = new_zir.getDeclaration(decl_inst)[0].name; switch (decl_name) { .@"comptime", .@"usingnamespace", .unnamed_test, .decltest => continue, - _ => if (decl_name.isNamedTest(old_zir)) continue, + _ => if (decl_name.isNamedTest(new_zir)) continue, } - const name_zir = decl_name.toString(old_zir).?; + const name_zir = decl_name.toString(new_zir).?; const name_ip = try zcu.intern_pool.getOrPutString( zcu.gpa, pt.tid, - old_zir.nullTerminatedString(name_zir), + new_zir.nullTerminatedString(name_zir), .no_embedded_nulls, ); if (!old_names.swapRemove(name_ip)) continue; From 6bd640c7a0866d7069ed68140afd894c6613e3da Mon Sep 17 00:00:00 2001 From: mlugg Date: Tue, 16 Jul 2024 19:48:05 +0100 Subject: [PATCH 2/2] Sema: typo --- src/Sema.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Sema.zig b/src/Sema.zig index 7f716a169d..2b43b75132 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -30007,7 +30007,7 @@ const InMemoryCoercionResult = union(enum) { }, .comptime_int_not_coercible => |int| { try sema.errNote(src, msg, "type '{}' cannot represent value '{}'", .{ - int.wanted.fmt(pt), int.actual.fmtValue(pt), + int.wanted.fmt(pt), int.actual.fmtValueSema(pt, sema), }); break; },