zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 01428d4a72c8013e1fe8cfc69eedeb843b1d75c8 (tree)
parent a3e288ab5be1008dafa86b47c18ebf480cc9d6a7
Author: Andrew Kelley <superjoe30@gmail.com>
Date:   Mon, 25 Jan 2016 22:20:52 -0700

analyze: fix crash when return type is invalid

Diffstat:
Msrc/analyze.cpp | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git 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); }