mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
Sema: fix integration with Io.Threaded
This commit is contained in:
committed by
Matthew Lugg
parent
5a376d97d4
commit
2479966df2
+5
-3
@@ -13174,19 +13174,21 @@ fn resolveSwitchItem(
|
||||
const pt = sema.pt;
|
||||
const zcu = pt.zcu;
|
||||
const ip = &zcu.intern_pool;
|
||||
const gpa = sema.gpa;
|
||||
const comp = zcu.comp;
|
||||
const gpa = comp.gpa;
|
||||
const io = comp.io;
|
||||
|
||||
var end = extra_index;
|
||||
const uncoerced: Air.Inst.Ref, const uncoerced_ty: Type = uncoerced: switch (item_info.unwrap()) {
|
||||
.enum_literal => |str_index| {
|
||||
const zir_str = sema.code.nullTerminatedString(str_index);
|
||||
const name = try ip.getOrPutString(gpa, pt.tid, zir_str, .no_embedded_nulls);
|
||||
const name = try ip.getOrPutString(gpa, io, pt.tid, zir_str, .no_embedded_nulls);
|
||||
const uncoerced = try sema.analyzeDeclLiteral(block, item_src, name, item_ty, false);
|
||||
break :uncoerced .{ uncoerced, .enum_literal };
|
||||
},
|
||||
.error_value => |str_index| {
|
||||
const zir_str = sema.code.nullTerminatedString(str_index);
|
||||
const name = try ip.getOrPutString(gpa, pt.tid, zir_str, .no_embedded_nulls);
|
||||
const name = try ip.getOrPutString(gpa, io, pt.tid, zir_str, .no_embedded_nulls);
|
||||
// Make sure there's an error integer value associated with `name`.
|
||||
_ = try pt.getErrorValue(name);
|
||||
const err_set_ty = try pt.singleErrorSetType(name);
|
||||
|
||||
Reference in New Issue
Block a user