| ... | @@ -22368,7 +22368,10 @@ fn zirErrorCast(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstData | ... | @@ -22368,7 +22368,10 @@ fn zirErrorCast(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstData |
| 22368 | | 22368 | |
| 22369 | try sema.requireRuntimeBlock(block, src, operand_src); | 22369 | try sema.requireRuntimeBlock(block, src, operand_src); |
| 22370 | const err_int_ty = try mod.errorIntType(); | 22370 | const err_int_ty = try mod.errorIntType(); |
| 22371 | if (block.wantSafety() and !dest_ty.isAnyError(mod) and sema.mod.backendSupportsFeature(.error_set_has_value)) { | 22371 | if (block.wantSafety() and !dest_ty.isAnyError(mod) and |
| | 22372 | dest_ty.toIntern() != .adhoc_inferred_error_set_type and |
| | 22373 | sema.mod.backendSupportsFeature(.error_set_has_value)) |
| | 22374 | { |
| 22372 | if (dest_tag == .ErrorUnion) { | 22375 | if (dest_tag == .ErrorUnion) { |
| 22373 | const err_code = try sema.analyzeErrUnionCode(block, operand_src, operand); | 22376 | const err_code = try sema.analyzeErrUnionCode(block, operand_src, operand); |
| 22374 | const err_int = try block.addBitCast(err_int_ty, err_code); | 22377 | const err_int = try block.addBitCast(err_int_ty, err_code); |