Skip to content

Commit

Permalink
Bug fixed in functions that return calls to other functions
Browse files Browse the repository at this point in the history
  • Loading branch information
clararod9 committed Dec 23, 2021
1 parent 3a33658 commit c691d87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/src/hir/sugar_cleaner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ fn map_returns(stmts: &mut Vec<Statement>, 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 {
Expand Down

0 comments on commit c691d87

Please sign in to comment.