| ... | ... | @@ -7580,7 +7580,8 @@ fn zirEnumToInt(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!A |
| 7580 | 7580 | const enum_tag: Air.Inst.Ref = switch (operand_ty.zigTypeTag()) { |
| 7581 | 7581 | .Enum => operand, |
| 7582 | 7582 | .Union => blk: { |
| 7583 | | const tag_ty = operand_ty.unionTagType() orelse { |
| 7583 | const union_ty = try sema.resolveTypeFields(operand_ty); |
| 7584 | const tag_ty = union_ty.unionTagType() orelse { |
| 7584 | 7585 | return sema.fail( |
| 7585 | 7586 | block, |
| 7586 | 7587 | operand_src, |
| ... | ... | @@ -22713,7 +22714,8 @@ fn fieldPtr( |
| 22713 | 22714 | return inst; |
| 22714 | 22715 | } |
| 22715 | 22716 | } |
| 22716 | | if (child_type.unionTagType()) |enum_ty| { |
| 22717 | const union_ty = try sema.resolveTypeFields(child_type); |
| 22718 | if (union_ty.unionTagType()) |enum_ty| { |
| 22717 | 22719 | if (enum_ty.enumFieldIndex(field_name)) |field_index| { |
| 22718 | 22720 | const field_index_u32 = @intCast(u32, field_index); |
| 22719 | 22721 | var anon_decl = try block.startAnonDecl(); |