diff --git a/src/ir.cpp b/src/ir.cpp index 7e73b3107d..b24cf3828e 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -23263,9 +23263,9 @@ static IrInstGen *ir_analyze_instruction_enum_tag_name(IrAnalyze *ira, IrInstSrc } if (target->value->type->id != ZigTypeIdEnum) { - ir_add_error(ira, target, + ir_add_error(ira, &target->base, buf_sprintf("expected enum tag, found '%s'", buf_ptr(&target->value->type->name))); - return ira->codegen->invalid_instruction; + return ira->codegen->invalid_inst_gen; } if (target->value->type->data.enumeration.src_field_count == 1 &&