stage1: fix unresolved inferred error sets
This commit is contained in:
12
src/ir.cpp
12
src/ir.cpp
@@ -18177,12 +18177,6 @@ static IrInstGen *ir_analyze_instruction_merge_err_sets(IrAnalyze *ira,
|
||||
if (type_is_invalid(op2_type))
|
||||
return ira->codegen->invalid_inst_gen;
|
||||
|
||||
if (type_is_global_error_set(op1_type) ||
|
||||
type_is_global_error_set(op2_type))
|
||||
{
|
||||
return ir_const_type(ira, &instruction->base.base, ira->codegen->builtin_types.entry_global_error_set);
|
||||
}
|
||||
|
||||
if (!resolve_inferred_error_set(ira->codegen, op1_type, instruction->op1->child->base.source_node)) {
|
||||
return ira->codegen->invalid_inst_gen;
|
||||
}
|
||||
@@ -18191,6 +18185,12 @@ static IrInstGen *ir_analyze_instruction_merge_err_sets(IrAnalyze *ira,
|
||||
return ira->codegen->invalid_inst_gen;
|
||||
}
|
||||
|
||||
if (type_is_global_error_set(op1_type) ||
|
||||
type_is_global_error_set(op2_type))
|
||||
{
|
||||
return ir_const_type(ira, &instruction->base.base, ira->codegen->builtin_types.entry_global_error_set);
|
||||
}
|
||||
|
||||
size_t errors_count = ira->codegen->errors_by_index.length;
|
||||
ErrorTableEntry **errors = heap::c_allocator.allocate<ErrorTableEntry *>(errors_count);
|
||||
for (uint32_t i = 0, count = op1_type->data.error_set.err_count; i < count; i += 1) {
|
||||
|
||||
Reference in New Issue
Block a user