Add a mono test for recursive lambda sets with late specialization

This commit is contained in:
Ayaz Hafiz 2023-03-27 09:30:15 -05:00
parent e06eac9769
commit b8a0ff8e7c
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 83 additions and 0 deletions

View file

@ -2804,3 +2804,21 @@ fn when_guard_appears_multiple_times_in_compiled_decision_tree_issue_5176() {
"#
)
}
#[mono_test]
fn recursive_lambda_set_resolved_only_upon_specialization() {
indoc!(
r#"
app "test" provides [main] to "./platform"
factCPS = \n, cont ->
if n == 0u8 then
cont 1u8
else
factCPS (n - 1) \value -> cont (n * value)
main =
factCPS 5 \x -> x
"#
)
}