From c691d87002ad887392bd1dd9ea88f2ed13863df0 Mon Sep 17 00:00:00 2001 From: clararod9 Date: Thu, 23 Dec 2021 18:04:15 +0100 Subject: [PATCH] Bug fixed in functions that return calls to other functions --- compiler/src/hir/sugar_cleaner.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/src/hir/sugar_cleaner.rs b/compiler/src/hir/sugar_cleaner.rs index 55232434a..41a73e0fd 100644 --- a/compiler/src/hir/sugar_cleaner.rs +++ b/compiler/src/hir/sugar_cleaner.rs @@ -388,7 +388,7 @@ fn map_returns(stmts: &mut Vec, mut fresh_id: usize) -> usize { let work = std::mem::take(stmts); for w in work { let should_split = match &w { - Return { value, .. } => value.is_array() || value.is_switch(), + Return { value, .. } => value.is_array() || value.is_switch() || value.is_call(), _ => false, }; if should_split {