From 01428d4a72c8013e1fe8cfc69eedeb843b1d75c8 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 25 Jan 2016 22:20:52 -0700 Subject: [PATCH] analyze: fix crash when return type is invalid --- src/analyze.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/analyze.cpp b/src/analyze.cpp index 31fa9c68c..27bda281c 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -3466,6 +3466,10 @@ static TypeTableEntry *analyze_fn_call_raw(CodeGen *g, ImportTableEntry *import, TypeTableEntry *return_type = unwrapped_node_type(fn_proto->return_type); + if (return_type->id == TypeTableEntryIdInvalid) { + return return_type; + } + if (handle_is_ptr(return_type)) { context->cast_alloca_list.append(node); }