Implement Hash for Bool

This commit is contained in:
Ayaz Hafiz 2023-03-28 15:04:45 -05:00
parent 6de36f29f9
commit f458da0cbc
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
5 changed files with 55 additions and 12 deletions

View file

@ -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"
)
}