From 652bfab3d0c554e1479563a6fe007d527ee0f5cb Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 12 Jan 2017 18:10:18 -0500 Subject: [PATCH] fix crash when casting fn call arg --- src/ir.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ir.cpp b/src/ir.cpp index 8da0f13498524fbe108e205e11729208fc66a82f..50eae17ebfa45cb041e7173202dc2609056890da 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -6154,6 +6154,7 @@ static IrInstruction *ir_analyze_cast_ref(IrAnalyze *ira, IrInstruction *source_ } else { IrInstruction *new_instruction = ir_build_ref(&ira->new_irb, source_instr->scope, source_instr->source_node, value, true); + new_instruction->value.type = wanted_type; TypeTableEntry *child_type = wanted_type->data.pointer.child_type; if (type_has_bits(child_type)) { -- 2.54.0