mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-20 15:27:45 +03:00
add test of integer type inference let polymorphism
This commit is contained in:
parent
0297e47fa1
commit
c4ddeefed9
@ -4315,4 +4315,26 @@ mod solve_expr {
|
||||
"Str",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn int_type_let_polymorphism() {
|
||||
infer_eq_without_problem(
|
||||
indoc!(
|
||||
r#"
|
||||
app "test" provides [ main ] to "./platform"
|
||||
|
||||
x = 4
|
||||
|
||||
f : U8 -> U32
|
||||
f = \z -> Num.intCast z
|
||||
|
||||
y = f x
|
||||
|
||||
main =
|
||||
x
|
||||
"#
|
||||
),
|
||||
"Num *",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user