mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-31 09:07:21 +00:00
Implement Hash for Bool
This commit is contained in:
parent
6de36f29f9
commit
f458da0cbc
5 changed files with 55 additions and 12 deletions
|
@ -8373,7 +8373,23 @@ mod solve_expr {
|
|||
# ^^^^^^^^^
|
||||
"#
|
||||
),
|
||||
@"Hash#Hash.hash(1) : a, I64 -[[Hash.hashI64(12)]]-> a | a has Hasher"
|
||||
@"Hash#Hash.hash(1) : a, I64 -[[Hash.hashI64(13)]]-> a | a has Hasher"
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn choose_bool_for_hash() {
|
||||
infer_queries!(
|
||||
indoc!(
|
||||
r#"
|
||||
app "test" provides [main] to "./platform"
|
||||
|
||||
main =
|
||||
\h -> Hash.hash h Bool.true
|
||||
# ^^^^^^^^^
|
||||
"#
|
||||
),
|
||||
@"Hash#Hash.hash(1) : a, Bool -[[Hash.hashBool(9)]]-> a | a has Hasher"
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue