add test of integer type inference let polymorphism

This commit is contained in:
Folkert 2021-02-21 20:45:17 +01:00
parent 0297e47fa1
commit c4ddeefed9

View File

@ -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 *",
);
}
}