mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-23 03:52:27 +00:00
Address PR comments, add syntax tests
This commit is contained in:
parent
b3e60f9d3a
commit
7518a2c5ab
28 changed files with 772 additions and 34 deletions
|
@ -2640,7 +2640,13 @@ fn canonicalize_pending_body<'a>(
|
|||
|
||||
// The closure is self tail recursive iff it tail calls itself (by defined name).
|
||||
let is_recursive = match can_output.tail_call {
|
||||
Some(tail_symbol) if tail_symbol == *defined_symbol => Recursive::TailRecursive,
|
||||
Some(tail_symbol) if tail_symbol == *defined_symbol => {
|
||||
if closure_data.early_returns.is_empty() {
|
||||
Recursive::TailRecursive
|
||||
} else {
|
||||
Recursive::Recursive
|
||||
}
|
||||
}
|
||||
_ => Recursive::NotRecursive,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue