| ... | ... | @@ -3206,7 +3206,15 @@ static TypeTableEntry *ir_determine_peer_types(IrAnalyze *ira, AstNode *source_n |
| 3206 | 3206 | } |
| 3207 | 3207 | } |
| 3208 | 3208 | if (any_are_pure_error && prev_inst->type_entry->id != TypeTableEntryIdPureError) { |
| 3209 | | return get_error_type(ira->codegen, prev_inst->type_entry); |
| 3209 | if (prev_inst->type_entry->id == TypeTableEntryIdNumLitInt || |
| 3210 | prev_inst->type_entry->id == TypeTableEntryIdNumLitFloat) |
| 3211 | { |
| 3212 | add_node_error(ira->codegen, source_node, |
| 3213 | buf_sprintf("unable to make error union out of number literal")); |
| 3214 | return ira->codegen->builtin_types.entry_invalid; |
| 3215 | } else { |
| 3216 | return get_error_type(ira->codegen, prev_inst->type_entry); |
| 3217 | } |
| 3210 | 3218 | } else { |
| 3211 | 3219 | return prev_inst->type_entry; |
| 3212 | 3220 | } |