| ... | @@ -11380,9 +11380,11 @@ static Stage1AirInst *ir_analyze_instruction_export(IrAnalyze *ira, Stage1ZirIns | ... | @@ -11380,9 +11380,11 @@ static Stage1AirInst *ir_analyze_instruction_export(IrAnalyze *ira, Stage1ZirIns |
| 11380 | } | 11380 | } |
| 11381 | break; | 11381 | break; |
| 11382 | case ZigTypeIdEnum: | 11382 | case ZigTypeIdEnum: |
| 11383 | if (target->value->type->data.enumeration.layout != ContainerLayoutExtern) { | 11383 | if ((err = type_resolve(ira->codegen, target->value->type, ResolveStatusZeroBitsKnown))) |
| | 11384 | return ira->codegen->invalid_inst_gen; |
| | 11385 | if (!target->value->type->data.enumeration.has_explicit_tag_type) { |
| 11384 | ErrorMsg *msg = ir_add_error(ira, target, | 11386 | ErrorMsg *msg = ir_add_error(ira, target, |
| 11385 | buf_sprintf("exported enum value must be declared extern")); | 11387 | buf_sprintf("exported enum value without explicit integer tag type")); |
| 11386 | add_error_note(ira->codegen, msg, target->value->type->data.enumeration.decl_node, buf_sprintf("declared here")); | 11388 | add_error_note(ira->codegen, msg, target->value->type->data.enumeration.decl_node, buf_sprintf("declared here")); |
| 11387 | } else { | 11389 | } else { |
| 11388 | want_var_export = true; | 11390 | want_var_export = true; |
| ... | @@ -11425,9 +11427,11 @@ static Stage1AirInst *ir_analyze_instruction_export(IrAnalyze *ira, Stage1ZirIns | ... | @@ -11425,9 +11427,11 @@ static Stage1AirInst *ir_analyze_instruction_export(IrAnalyze *ira, Stage1ZirIns |
| 11425 | } | 11427 | } |
| 11426 | break; | 11428 | break; |
| 11427 | case ZigTypeIdEnum: | 11429 | case ZigTypeIdEnum: |
| 11428 | if (type_value->data.enumeration.layout != ContainerLayoutExtern) { | 11430 | if ((err = type_resolve(ira->codegen, type_value, ResolveStatusZeroBitsKnown))) |
| | 11431 | return ira->codegen->invalid_inst_gen; |
| | 11432 | if (!type_value->data.enumeration.has_explicit_tag_type) { |
| 11429 | ErrorMsg *msg = ir_add_error(ira, target, | 11433 | ErrorMsg *msg = ir_add_error(ira, target, |
| 11430 | buf_sprintf("exported enum must be declared extern")); | 11434 | buf_sprintf("exported enum without explicit integer tag type")); |
| 11431 | add_error_note(ira->codegen, msg, type_value->data.enumeration.decl_node, buf_sprintf("declared here")); | 11435 | add_error_note(ira->codegen, msg, type_value->data.enumeration.decl_node, buf_sprintf("declared here")); |
| 11432 | } | 11436 | } |
| 11433 | break; | 11437 | break; |