From 05de70017d8bf15a37f1d1be4e23f5d3f3f9b146 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 7 Nov 2016 18:58:01 -0500 Subject: IR: support slice types --- src/analyze.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/analyze.cpp') diff --git a/src/analyze.cpp b/src/analyze.cpp index 50e690b9bf..a329fa540c 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -369,7 +369,7 @@ TypeTableEntry *get_maybe_type(CodeGen *g, TypeTableEntry *child_type) { } } -static TypeTableEntry *get_error_type(CodeGen *g, TypeTableEntry *child_type) { +TypeTableEntry *get_error_type(CodeGen *g, TypeTableEntry *child_type) { if (child_type->error_parent) { return child_type->error_parent; } else { @@ -2582,7 +2582,7 @@ static void analyze_fn_body(CodeGen *g, FnTableEntry *fn_table_entry) { &fn_table_entry->analyzed_executable, expected_type, fn_proto->return_type); node->data.fn_def.implicit_return_type = block_return_type; - if (g->verbose) { + if (block_return_type->id != TypeTableEntryIdInvalid && g->verbose) { fprintf(stderr, "fn %s { // (analyzed)\n", buf_ptr(&fn_table_entry->symbol_name)); ir_print(stderr, &fn_table_entry->analyzed_executable, 4); fprintf(stderr, "}\n"); -- cgit v1.2.3