aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-11-07 14:46:48 -0500
committerAndrew Kelley <andrew@ziglang.org>2019-11-08 15:57:24 -0500
commitfa34dfcce7bfe44840c0cf1ac450c2dc457ce94a (patch)
treeeba12d7b22b934caa82966c669e846268addab39 /src/ir.cpp
parente0db54e89d6f4e9f56800ddb1017e30be1b7d58a (diff)
downloadzig-fa34dfcce7bfe44840c0cf1ac450c2dc457ce94a.tar.gz
zig-fa34dfcce7bfe44840c0cf1ac450c2dc457ce94a.zip
fix result loc of cast not finding parent
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}