mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 15:03:46 +00:00
Add unbound runtime error function var gen test
This commit is contained in:
parent
ab75de39d6
commit
efbd1bf4c7
1 changed files with 18 additions and 0 deletions
|
@ -2974,3 +2974,21 @@ fn call_function_in_empty_list() {
|
|||
RocList<()>
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
// TODO to be improved, if we can generate the void function type for the function in the list,
|
||||
// this should succeed.
|
||||
#[should_panic(expected = r#"Roc failed with message: "#)]
|
||||
fn call_function_in_empty_list_unbound() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
lst = []
|
||||
List.map lst \f -> f {}
|
||||
"#
|
||||
),
|
||||
RocList::from_slice(&[]),
|
||||
RocList<()>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue