mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-25 21:37:48 +00:00
Derive Eq for opaques
This commit is contained in:
parent
40e05d5a00
commit
83813afeaf
3 changed files with 89 additions and 2 deletions
|
|
@ -8061,4 +8061,21 @@ mod solve_expr {
|
|||
@"N#Hash.hash(3) : a, N -[[#N_hash(3)]]-> a | a has Hasher"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn derive_eq_for_opaque() {
|
||||
infer_queries!(
|
||||
indoc!(
|
||||
r#"
|
||||
app "test" provides [main] to "./platform"
|
||||
|
||||
N := U8 has [Eq]
|
||||
|
||||
main = Bool.isEq (@N 15) (@N 23)
|
||||
# ^^^^^^^^^
|
||||
"#
|
||||
),
|
||||
@"N#Bool.isEq(3) : N, N -[[#N_isEq(3)]]-> Bool"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue