| ... | ... | @@ -20000,6 +20000,11 @@ static IrInstGen *ir_analyze_fn_call(IrAnalyze *ira, IrInst* source_instr, |
| 20000 | 20000 | if (type_is_invalid(result_loc->value->type) || result_loc->value->type->id == ZigTypeIdUnreachable) { |
| 20001 | 20001 | return result_loc; |
| 20002 | 20002 | } |
| 20003 | if (result_loc->value->type->data.pointer.is_const) { |
| 20004 | ir_add_error(ira, source_instr, buf_sprintf("cannot assign to constant")); |
| 20005 | return ira->codegen->invalid_inst_gen; |
| 20006 | } |
| 20007 | |
| 20003 | 20008 | IrInstGen *dummy_value = ir_const(ira, source_instr, impl_fn_type_id->return_type); |
| 20004 | 20009 | dummy_value->value->special = ConstValSpecialRuntime; |
| 20005 | 20010 | IrInstGen *dummy_result = ir_implicit_cast2(ira, source_instr, |
| ... | ... | @@ -20138,6 +20143,11 @@ static IrInstGen *ir_analyze_fn_call(IrAnalyze *ira, IrInst* source_instr, |
| 20138 | 20143 | if (type_is_invalid(result_loc->value->type) || result_loc->value->type->id == ZigTypeIdUnreachable) { |
| 20139 | 20144 | return result_loc; |
| 20140 | 20145 | } |
| 20146 | if (result_loc->value->type->data.pointer.is_const) { |
| 20147 | ir_add_error(ira, source_instr, buf_sprintf("cannot assign to constant")); |
| 20148 | return ira->codegen->invalid_inst_gen; |
| 20149 | } |
| 20150 | |
| 20141 | 20151 | IrInstGen *dummy_value = ir_const(ira, source_instr, return_type); |
| 20142 | 20152 | dummy_value->value->special = ConstValSpecialRuntime; |
| 20143 | 20153 | IrInstGen *dummy_result = ir_implicit_cast2(ira, source_instr, |