mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Handle recursive calls to capturing function
This commit is contained in:
parent
d07c273542
commit
b868e0e469
3 changed files with 97 additions and 23 deletions
|
@ -1682,3 +1682,18 @@ fn choose_u128_layout() {
|
|||
"#
|
||||
)
|
||||
}
|
||||
|
||||
#[mono_test]
|
||||
fn recursive_call_capturing_function() {
|
||||
indoc!(
|
||||
r#"
|
||||
a = \b ->
|
||||
c : U32 -> U32
|
||||
c = \d ->
|
||||
if True then d else c (d+b)
|
||||
c 0
|
||||
|
||||
a 6
|
||||
"#
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue