mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Add gen test for #4733
This commit is contained in:
parent
b8aa8df100
commit
1727a9a123
1 changed files with 23 additions and 0 deletions
|
@ -2083,3 +2083,26 @@ fn unify_types_with_fixed_fixpoints_outside_fixing_region() {
|
|||
RocStr
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
fn lambda_set_with_imported_toplevels_issue_4733() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
app "test" provides [main] to "./platform"
|
||||
|
||||
fn = \s ->
|
||||
instr = if s == "*" then (Op Num.mul) else (Op Num.add)
|
||||
|
||||
Op op = instr
|
||||
|
||||
\a -> op a a
|
||||
|
||||
main = ((fn "*") 3) * ((fn "+") 5)
|
||||
"#
|
||||
),
|
||||
90,
|
||||
i64
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue