Add gen test for #4077

This commit is contained in:
Ayaz Hafiz 2022-11-15 14:26:33 -06:00
parent 2a5864c19a
commit 08eda910ef
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -2022,3 +2022,28 @@ fn dispatch_tag_union_function_inferred() {
RocStr
);
}
#[test]
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
fn issue_4077_fixed_fixpoint() {
assert_evals_to!(
indoc!(
r#"
app "test" provides [main] to "./platform"
Input : [FromProjectSource, FromJob Job]
Job : [Job { inputs : List Input }]
job : { inputs : List Input } -> Job
job = \config -> Job config
main =
when job { inputs: [] } is
_ -> "OKAY"
"#
),
RocStr::from("OKAY"),
RocStr
);
}