This commit is contained in:
Folkert 2021-09-15 23:25:08 +02:00
parent 737fb6b60d
commit 03d0fa524c

View file

@ -2782,3 +2782,24 @@ fn value_not_exposed_hits_panic() {
i64 i64
); );
} }
#[test]
fn mix_function_and_closure() {
assert_evals_to!(
indoc!(
r#"
app "test" provides [ main ] to "./platform"
foo = \x -> x
bar = \y -> \_ -> y
main : Str
main =
(if 1 == 1 then foo else (bar "nope nope nope")) "hello world"
"#
),
RocStr::from_slice(b"hello world"),
RocStr
);
}