| ... | @@ -14499,6 +14499,11 @@ static TypeTableEntry *ir_analyze_instruction_panic(IrAnalyze *ira, IrInstructio | ... | @@ -14499,6 +14499,11 @@ static TypeTableEntry *ir_analyze_instruction_panic(IrAnalyze *ira, IrInstructio |
| 14499 | if (type_is_invalid(msg->value.type)) | 14499 | if (type_is_invalid(msg->value.type)) |
| 14500 | return ira->codegen->builtin_types.entry_invalid; | 14500 | return ira->codegen->builtin_types.entry_invalid; |
| 14501 | | 14501 | |
| | 14502 | if (ir_should_inline(ira->new_irb.exec, instruction->base.scope)) { |
| | 14503 | ir_add_error(ira, &instruction->base, buf_sprintf("encountered @panic at compile-time")); |
| | 14504 | return ira->codegen->builtin_types.entry_invalid; |
| | 14505 | } |
| | 14506 | |
| 14502 | TypeTableEntry *u8_ptr_type = get_pointer_to_type(ira->codegen, ira->codegen->builtin_types.entry_u8, true); | 14507 | TypeTableEntry *u8_ptr_type = get_pointer_to_type(ira->codegen, ira->codegen->builtin_types.entry_u8, true); |
| 14503 | TypeTableEntry *str_type = get_slice_type(ira->codegen, u8_ptr_type); | 14508 | TypeTableEntry *str_type = get_slice_type(ira->codegen, u8_ptr_type); |
| 14504 | IrInstruction *casted_msg = ir_implicit_cast(ira, msg, str_type); | 14509 | IrInstruction *casted_msg = ir_implicit_cast(ira, msg, str_type); |