From fa34dfcce7bfe44840c0cf1ac450c2dc457ce94a Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 7 Nov 2019 14:46:48 -0500 Subject: fix result loc of cast not finding parent --- src/ir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ir.cpp') diff --git a/src/ir.cpp b/src/ir.cpp index ae5987d030..4ce988e689 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -15733,7 +15733,7 @@ static IrInstruction *ir_resolve_result_raw(IrAnalyze *ira, IrInstruction *suspe casted_value = nullptr; } - if (casted_value == nullptr || type_is_invalid(casted_value->value.type)) { + if (casted_value != nullptr && type_is_invalid(casted_value->value.type)) { return casted_value; } -- cgit v1.2.3