mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-01 13:34:15 +00:00
Choose hash implementation for ranged number based on default width
Closes #4416
This commit is contained in:
parent
3305041316
commit
9c8a4ec027
3 changed files with 94 additions and 33 deletions
|
|
@ -8220,4 +8220,20 @@ mod solve_expr {
|
|||
"{} -> Task",
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn choose_ranged_num_for_hash() {
|
||||
infer_queries!(
|
||||
indoc!(
|
||||
r#"
|
||||
app "test" provides [main] to "./platform"
|
||||
|
||||
main =
|
||||
\h -> Hash.hash h 7
|
||||
# ^^^^^^^^^
|
||||
"#
|
||||
),
|
||||
@"Hash#Hash.hash(1) : a, I64 -[[Hash.hashI64(12)]]-> a | a has Hasher"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue