| ... | @@ -4114,7 +4114,10 @@ fn airIsErr(cg: *CodeGen, inst: Air.Inst.Index, opcode: std.wasm.Opcode, op_kind | ... | @@ -4114,7 +4114,10 @@ fn airIsErr(cg: *CodeGen, inst: Air.Inst.Index, opcode: std.wasm.Opcode, op_kind |
| 4114 | const zcu = cg.pt.zcu; | 4114 | const zcu = cg.pt.zcu; |
| 4115 | const un_op = cg.air.instructions.items(.data)[@intFromEnum(inst)].un_op; | 4115 | const un_op = cg.air.instructions.items(.data)[@intFromEnum(inst)].un_op; |
| 4116 | const operand = try cg.resolveInst(un_op); | 4116 | const operand = try cg.resolveInst(un_op); |
| 4117 | const err_union_ty = cg.typeOf(un_op); | 4117 | const err_union_ty = switch (op_kind) { |
| | 4118 | .value => cg.typeOf(un_op), |
| | 4119 | .ptr => cg.typeOf(un_op).childType(zcu), |
| | 4120 | }; |
| 4118 | const pl_ty = err_union_ty.errorUnionPayload(zcu); | 4121 | const pl_ty = err_union_ty.errorUnionPayload(zcu); |
| 4119 | | 4122 | |
| 4120 | const result: WValue = result: { | 4123 | const result: WValue = result: { |