add mono test

This commit is contained in:
Folkert 2021-09-24 15:44:09 +02:00
parent f43c10373f
commit b7f26baf95
2 changed files with 70 additions and 0 deletions

View file

@ -1084,6 +1084,33 @@ fn specialize_lowlevel() {
)
}
#[mono_test]
fn empty_list_of_function_type() {
// see https://github.com/rtfeldman/roc/issues/1732
indoc!(
r#"
app "test" provides [ main ] to "./platform"
main =
myList : List (Str -> Str)
myList = []
myClosure : Str -> Str
myClosure = \_ -> "bar"
choose =
if False then
myList
else
[ myClosure ]
when List.get choose 0 is
Ok f -> f "foo"
Err _ -> "bad!"
"#
)
}
// #[ignore]
// #[mono_test]
// fn static_str_closure() {