| ... | @@ -16918,18 +16918,18 @@ static TypeTableEntry *ir_analyze_instruction_can_implicit_cast(IrAnalyze *ira, | ... | @@ -16918,18 +16918,18 @@ static TypeTableEntry *ir_analyze_instruction_can_implicit_cast(IrAnalyze *ira, |
| 16918 | static TypeTableEntry *ir_analyze_instruction_panic(IrAnalyze *ira, IrInstructionPanic *instruction) { | 16918 | static TypeTableEntry *ir_analyze_instruction_panic(IrAnalyze *ira, IrInstructionPanic *instruction) { |
| 16919 | IrInstruction *msg = instruction->msg->other; | 16919 | IrInstruction *msg = instruction->msg->other; |
| 16920 | if (type_is_invalid(msg->value.type)) | 16920 | if (type_is_invalid(msg->value.type)) |
| 16921 | return ira->codegen->builtin_types.entry_invalid; | 16921 | return ir_unreach_error(ira); |
| 16922 | | 16922 | |
| 16923 | if (ir_should_inline(ira->new_irb.exec, instruction->base.scope)) { | 16923 | if (ir_should_inline(ira->new_irb.exec, instruction->base.scope)) { |
| 16924 | ir_add_error(ira, &instruction->base, buf_sprintf("encountered @panic at compile-time")); | 16924 | ir_add_error(ira, &instruction->base, buf_sprintf("encountered @panic at compile-time")); |
| 16925 | return ira->codegen->builtin_types.entry_invalid; | 16925 | return ir_unreach_error(ira); |
| 16926 | } | 16926 | } |
| 16927 | | 16927 | |
| 16928 | TypeTableEntry *u8_ptr_type = get_pointer_to_type(ira->codegen, ira->codegen->builtin_types.entry_u8, true); | 16928 | TypeTableEntry *u8_ptr_type = get_pointer_to_type(ira->codegen, ira->codegen->builtin_types.entry_u8, true); |
| 16929 | TypeTableEntry *str_type = get_slice_type(ira->codegen, u8_ptr_type); | 16929 | TypeTableEntry *str_type = get_slice_type(ira->codegen, u8_ptr_type); |
| 16930 | IrInstruction *casted_msg = ir_implicit_cast(ira, msg, str_type); | 16930 | IrInstruction *casted_msg = ir_implicit_cast(ira, msg, str_type); |
| 16931 | if (type_is_invalid(casted_msg->value.type)) | 16931 | if (type_is_invalid(casted_msg->value.type)) |
| 16932 | return ira->codegen->builtin_types.entry_invalid; | 16932 | return ir_unreach_error(ira); |
| 16933 | | 16933 | |
| 16934 | IrInstruction *new_instruction = ir_build_panic(&ira->new_irb, instruction->base.scope, | 16934 | IrInstruction *new_instruction = ir_build_panic(&ira->new_irb, instruction->base.scope, |
| 16935 | instruction->base.source_node, casted_msg); | 16935 | instruction->base.source_node, casted_msg); |