| ... | @@ -5166,9 +5166,7 @@ static ZigType *ir_resolve_peer_types(IrAnalyze *ira, AstNode *source_node, ZigT | ... | @@ -5166,9 +5166,7 @@ static ZigType *ir_resolve_peer_types(IrAnalyze *ira, AstNode *source_node, ZigT |
| 5166 | continue; | 5166 | continue; |
| 5167 | } | 5167 | } |
| 5168 | | 5168 | |
| 5169 | if (prev_type->id == ZigTypeIdEnum && cur_type->id == ZigTypeIdUnion && | 5169 | if (prev_type->id == ZigTypeIdEnum && is_tagged_union(cur_type)) { |
| 5170 | (cur_type->data.unionation.decl_node->data.container_decl.auto_enum || cur_type->data.unionation.decl_node->data.container_decl.init_arg_expr != nullptr)) | | |
| 5171 | { | | |
| 5172 | if ((err = type_resolve(ira->codegen, cur_type, ResolveStatusZeroBitsKnown))) | 5170 | if ((err = type_resolve(ira->codegen, cur_type, ResolveStatusZeroBitsKnown))) |
| 5173 | return ira->codegen->builtin_types.entry_invalid; | 5171 | return ira->codegen->builtin_types.entry_invalid; |
| 5174 | if (cur_type->data.unionation.tag_type == prev_type) { | 5172 | if (cur_type->data.unionation.tag_type == prev_type) { |
| ... | @@ -5176,9 +5174,7 @@ static ZigType *ir_resolve_peer_types(IrAnalyze *ira, AstNode *source_node, ZigT | ... | @@ -5176,9 +5174,7 @@ static ZigType *ir_resolve_peer_types(IrAnalyze *ira, AstNode *source_node, ZigT |
| 5176 | } | 5174 | } |
| 5177 | } | 5175 | } |
| 5178 | | 5176 | |
| 5179 | if (cur_type->id == ZigTypeIdEnum && prev_type->id == ZigTypeIdUnion && | 5177 | if (cur_type->id == ZigTypeIdEnum && is_tagged_union(prev_type)) { |
| 5180 | (prev_type->data.unionation.decl_node->data.container_decl.auto_enum || prev_type->data.unionation.decl_node->data.container_decl.init_arg_expr != nullptr)) | | |
| 5181 | { | | |
| 5182 | if ((err = type_resolve(ira->codegen, prev_type, ResolveStatusZeroBitsKnown))) | 5178 | if ((err = type_resolve(ira->codegen, prev_type, ResolveStatusZeroBitsKnown))) |
| 5183 | return ira->codegen->builtin_types.entry_invalid; | 5179 | return ira->codegen->builtin_types.entry_invalid; |
| 5184 | if (prev_type->data.unionation.tag_type == cur_type) { | 5180 | if (prev_type->data.unionation.tag_type == cur_type) { |
| ... | @@ -15816,10 +15812,7 @@ static Stage1AirInst *ir_analyze_instruction_field_ptr(IrAnalyze *ira, Stage1Zir | ... | @@ -15816,10 +15812,7 @@ static Stage1AirInst *ir_analyze_instruction_field_ptr(IrAnalyze *ira, Stage1Zir |
| 15816 | } | 15812 | } |
| 15817 | return ir_analyze_decl_ref(ira, field_ptr_instruction->base.scope, field_ptr_instruction->base.source_node, tld); | 15813 | return ir_analyze_decl_ref(ira, field_ptr_instruction->base.scope, field_ptr_instruction->base.source_node, tld); |
| 15818 | } | 15814 | } |
| 15819 | if (child_type->id == ZigTypeIdUnion && | 15815 | if (is_tagged_union(child_type)) { |
| 15820 | (child_type->data.unionation.decl_node->data.container_decl.init_arg_expr != nullptr || | | |
| 15821 | child_type->data.unionation.decl_node->data.container_decl.auto_enum)) | | |
| 15822 | { | | |
| 15823 | if ((err = type_resolve(ira->codegen, child_type, ResolveStatusSizeKnown))) | 15816 | if ((err = type_resolve(ira->codegen, child_type, ResolveStatusSizeKnown))) |
| 15824 | return ira->codegen->invalid_inst_gen; | 15817 | return ira->codegen->invalid_inst_gen; |
| 15825 | TypeUnionField *field = find_union_type_field(child_type, field_name); | 15818 | TypeUnionField *field = find_union_type_field(child_type, field_name); |