Get multimorphic lambda captures working

This commit is contained in:
Ayaz Hafiz 2022-06-28 17:13:15 -04:00 committed by ayazhafiz
parent 88618c098d
commit 8be230695b
No known key found for this signature in database
GPG key ID: B443F7A3030C9AED
9 changed files with 458 additions and 423 deletions

View file

@ -1527,24 +1527,22 @@ fn tail_call_with_different_layout() {
}
#[mono_test]
#[ignore]
fn lambda_sets_collide_with_captured_var() {
fn multimorphic_lambda_set_capture() {
indoc!(
r#"
capture : a -> ({} -> Str)
capture = \val ->
thunk =
\{} ->
when val is
_ -> ""
thunk
\{} ->
when val is
_ -> ""
x : [True, False]
x = True
fun =
when x is
True -> capture 1u8
False -> capture 1u64
True -> capture {}
False -> capture ""
fun {}
"#