aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-06-22 19:02:59 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-06-22 19:02:59 -0400
commit7e303fa28feaa10d7dbf08fdc3e86c47bba882e6 (patch)
tree98cbbc5f4f5c7100878913559cd7e59f50a88db5 /src
parent2b1695b1b03b42719f02c4ed4d4b5d3495a2ca3a (diff)
downloadzig-7e303fa28feaa10d7dbf08fdc3e86c47bba882e6.tar.gz
zig-7e303fa28feaa10d7dbf08fdc3e86c47bba882e6.zip
fix another crash
Diffstat (limited to 'src')
-rw-r--r--src/ir.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 823ddb13a3..f73c3f0d45 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -15092,6 +15092,9 @@ static IrInstruction *ir_resolve_result_raw(IrAnalyze *ira, IrInstruction *suspe
if (is_comptime)
return nullptr;
}
+ if ((err = type_resolve(ira->codegen, ira->explicit_return_type, ResolveStatusZeroBitsKnown))) {
+ return ira->codegen->invalid_instruction;
+ }
if (!type_has_bits(ira->explicit_return_type) || !handle_is_ptr(ira->explicit_return_type))
return nullptr;