authorgravatar for justus@klausecker.deJustus Klausecker <justus@klausecker.de> 2026-01-10 15:31:55+01:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2026-01-11 11:37:18+00:00
log2479966df2ab1c375ec48be025cb265b6887ded5
tree599a834815cdde66cdd5b76da0ad39deb9f8d658
parent5a376d97d4595f12dffaf54c4cfc303b0e902cc6
signaturelock-open Commit is signed but in an unrecognized format.

Sema: fix integration with `Io.Threaded`


1 files changed, 5 insertions(+), 3 deletions(-)

src/Sema.zig+5-3
......@@ -13174,19 +13174,21 @@ fn resolveSwitchItem(
1317413174 const pt = sema.pt;
1317513175 const zcu = pt.zcu;
1317613176 const ip = &zcu.intern_pool;
13177 const gpa = sema.gpa;
13177 const comp = zcu.comp;
13178 const gpa = comp.gpa;
13179 const io = comp.io;
1317813180
1317913181 var end = extra_index;
1318013182 const uncoerced: Air.Inst.Ref, const uncoerced_ty: Type = uncoerced: switch (item_info.unwrap()) {
1318113183 .enum_literal => |str_index| {
1318213184 const zir_str = sema.code.nullTerminatedString(str_index);
13183 const name = try ip.getOrPutString(gpa, pt.tid, zir_str, .no_embedded_nulls);
13185 const name = try ip.getOrPutString(gpa, io, pt.tid, zir_str, .no_embedded_nulls);
1318413186 const uncoerced = try sema.analyzeDeclLiteral(block, item_src, name, item_ty, false);
1318513187 break :uncoerced .{ uncoerced, .enum_literal };
1318613188 },
1318713189 .error_value => |str_index| {
1318813190 const zir_str = sema.code.nullTerminatedString(str_index);
13189 const name = try ip.getOrPutString(gpa, pt.tid, zir_str, .no_embedded_nulls);
13191 const name = try ip.getOrPutString(gpa, io, pt.tid, zir_str, .no_embedded_nulls);
1319013192 // Make sure there's an error integer value associated with `name`.
1319113193 _ = try pt.getErrorValue(name);
1319213194 const err_set_ty = try pt.singleErrorSetType(name);