| ... | ... | @@ -13174,19 +13174,21 @@ fn resolveSwitchItem( |
| 13174 | 13174 | const pt = sema.pt; |
| 13175 | 13175 | const zcu = pt.zcu; |
| 13176 | 13176 | 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; |
| 13178 | 13180 | |
| 13179 | 13181 | var end = extra_index; |
| 13180 | 13182 | const uncoerced: Air.Inst.Ref, const uncoerced_ty: Type = uncoerced: switch (item_info.unwrap()) { |
| 13181 | 13183 | .enum_literal => |str_index| { |
| 13182 | 13184 | 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); |
| 13184 | 13186 | const uncoerced = try sema.analyzeDeclLiteral(block, item_src, name, item_ty, false); |
| 13185 | 13187 | break :uncoerced .{ uncoerced, .enum_literal }; |
| 13186 | 13188 | }, |
| 13187 | 13189 | .error_value => |str_index| { |
| 13188 | 13190 | 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); |
| 13190 | 13192 | // Make sure there's an error integer value associated with `name`. |
| 13191 | 13193 | _ = try pt.getErrorValue(name); |
| 13192 | 13194 | const err_set_ty = try pt.singleErrorSetType(name); |