diff --git a/ast.c b/ast.c index 7fcab15..04e13b8 100644 --- a/ast.c +++ b/ast.c @@ -1505,7 +1505,7 @@ bool ast_function_codegen(ast_function *self, ir_builder *ir) } /* TODO: check return types */ - if (!self->curblock->is_return) + if (!self->curblock->final) { if (!self->vtype->expression.next || self->vtype->expression.next->expression.vtype == TYPE_VOID)