From 7e303fa28feaa10d7dbf08fdc3e86c47bba882e6 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sat, 22 Jun 2019 19:02:59 -0400 Subject: fix another crash --- src/ir.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/ir.cpp') 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; -- cgit v1.2.3