diff --git a/src/compiler/llvm_codegen_expr.c b/src/compiler/llvm_codegen_expr.c index b1a52c035..c10c188f7 100644 --- a/src/compiler/llvm_codegen_expr.c +++ b/src/compiler/llvm_codegen_expr.c @@ -5851,8 +5851,7 @@ static inline void llvm_emit_return_block(GenContext *c, BEValue *be_value, Type *block_exit= &exit; - - if (type_no_optional(type_lowered) != type_void) + if (type_lowered != type_void) { exit.block_return_out = llvm_emit_alloca_aligned(c, type_lowered, "blockret"); } @@ -5890,7 +5889,7 @@ static inline void llvm_emit_return_block(GenContext *c, BEValue *be_value, Type } // return foo() where foo() is a void! - if (type_no_optional(type_flatten(ret_expr->type)) == type_void) break; + if (type_lowering(ret_expr->type) == type_void) break; LLVMInstructionEraseFromParent(exit.block_return_out); diff --git a/src/version.h b/src/version.h index 0111e7739..b32561722 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define COMPILER_VERSION "0.4.606" \ No newline at end of file +#define COMPILER_VERSION "0.4.607" \ No newline at end of file