mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
Support monomorphic captures of polymorphic expressions in closures
Closes #4349
This commit is contained in:
parent
a4ed5a582d
commit
ee8e718cc1
2 changed files with 212 additions and 98 deletions
|
@ -4103,3 +4103,25 @@ fn issue_4348() {
|
|||
RocStr
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
fn issue_4349() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
ir = Ok ""
|
||||
res =
|
||||
Result.try ir \_ ->
|
||||
when ir is
|
||||
Ok "" -> Ok ""
|
||||
_ -> Err Bad
|
||||
when res is
|
||||
Ok _ -> "okay"
|
||||
_ -> "FAIL"
|
||||
"#
|
||||
),
|
||||
RocStr::from("okay"),
|
||||
RocStr
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue