mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
parent
0fab77af99
commit
aa26a0da44
1 changed files with 46 additions and 0 deletions
|
@ -9,6 +9,8 @@ use crate::helpers::wasm::assert_evals_to;
|
|||
|
||||
use indoc::indoc;
|
||||
#[allow(unused_imports)]
|
||||
use roc_std::RocList;
|
||||
#[allow(unused_imports)]
|
||||
use roc_std::RocStr;
|
||||
|
||||
#[test]
|
||||
|
@ -3838,3 +3840,47 @@ fn compose_recursive_lambda_set_productive_inferred() {
|
|||
RocStr
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
fn local_binding_aliases_function() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
app "test" provides [ main ] to "./platform"
|
||||
|
||||
f : {} -> List a
|
||||
f = \_ -> []
|
||||
|
||||
main : List U8
|
||||
main =
|
||||
g = f
|
||||
|
||||
g {}
|
||||
"#
|
||||
),
|
||||
RocList::<u8>::from_slice(&[]),
|
||||
RocList<u8>
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
fn local_binding_aliases_function_inferred() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
app "test" provides [ main ] to "./platform"
|
||||
|
||||
f = \_ -> []
|
||||
|
||||
main =
|
||||
g = f
|
||||
|
||||
g {}
|
||||
"#
|
||||
),
|
||||
RocList::from_slice(&[]),
|
||||
RocList<std::convert::Infallible>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue