mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 06:55:15 +00:00
Add rank-generalization test
This commit is contained in:
parent
cb9f776781
commit
dc30dbc8a4
1 changed files with 18 additions and 0 deletions
|
@ -8656,4 +8656,22 @@ mod solve_expr {
|
|||
"###
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn rank_no_overgeneralization() {
|
||||
infer_queries!(
|
||||
indoc!(
|
||||
r#"
|
||||
app "test" provides [main] to "./platform"
|
||||
|
||||
main =
|
||||
#^^^^{-1}
|
||||
\x ->
|
||||
y = \z -> x z
|
||||
y
|
||||
"#
|
||||
),
|
||||
@"main : (a -[[]]-> b) -[[main(0)]]-> (a -[[y(2) (a -[[]]-> b)]]-> b)"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue