be smarter

This commit is contained in:
Folkert 2022-03-04 23:02:10 +01:00
parent cfccb92bf9
commit db06c10b5f
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
4 changed files with 209 additions and 40 deletions

View file

@ -5509,4 +5509,42 @@ mod solve_expr {
r#"Id [ A, B, C { a : Str }e ] -> Str"#,
)
}
#[test]
fn inner_annotation_rigid() {
infer_eq_without_problem(
indoc!(
r#"
f : a -> a
f =
g : b -> b
g = \x -> x
g
f
"#
),
r#"a -> a"#,
)
}
#[test]
fn inner_annotation_rigid_2() {
infer_eq_without_problem(
indoc!(
r#"
f : {} -> List a
f =
g : List a
g = []
\{} -> g
f
"#
),
r#"{} -> List a"#,
)
}
}