mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-23 14:35:12 +00:00
Add Eq
to the standard library
This commit is contained in:
parent
b2e7fd91ab
commit
16d12a51c2
7 changed files with 73 additions and 3 deletions
|
@ -7972,4 +7972,22 @@ mod solve_expr {
|
|||
"O",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn custom_implement_eq() {
|
||||
infer_eq_without_problem(
|
||||
indoc!(
|
||||
r#"
|
||||
app "test" provides [main] to "./platform"
|
||||
|
||||
Trivial := {} has [Eq {isEq}]
|
||||
|
||||
isEq = \@Trivial {}, @Trivial {} -> Bool.true
|
||||
|
||||
main = Eq.isEq (@Trivial {}) (@Trivial {})
|
||||
"#
|
||||
),
|
||||
"Bool",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue