mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +00:00
Compile lambdas that have an empty lambda set
Closes #3224 This should also fix a number of other issues often observed when a lambda is never actually called, but we fail to codegen because it has an empty lambda set.
This commit is contained in:
parent
7365da6f69
commit
937b73b797
6 changed files with 89 additions and 14 deletions
|
@ -2958,3 +2958,19 @@ fn with_capacity() {
|
|||
RocList<u64>
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
fn call_function_in_empty_list() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
lst : List ({} -> {})
|
||||
lst = []
|
||||
List.map lst \f -> f {}
|
||||
"#
|
||||
),
|
||||
RocList::from_slice(&[]),
|
||||
RocList<()>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue