mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
Add test for inferring multiple ability bounds
This commit is contained in:
parent
46b741e9dd
commit
0a96a93a67
1 changed files with 18 additions and 0 deletions
|
@ -8115,4 +8115,22 @@ mod solve_expr {
|
|||
@"N#Bool.isEq(3) : N, N -[[#N_isEq(3)]]-> Bool"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn multiple_variables_bound_to_an_ability() {
|
||||
infer_queries!(
|
||||
indoc!(
|
||||
r#"
|
||||
app "test" provides [main] to "./platform"
|
||||
|
||||
F a : a | a has Hash
|
||||
|
||||
main : F a -> F a
|
||||
#^^^^{-1}
|
||||
"#
|
||||
),
|
||||
@"main : a -[[main(0)]]-> a | a has Hash"
|
||||
print_only_under_alias: true
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue