Handle aliasing of ability members

This commit is contained in:
Ayaz Hafiz 2022-04-15 10:21:35 -04:00
parent 7d4a006377
commit 95783e03a1
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 119 additions and 54 deletions

View file

@ -59,3 +59,28 @@ fn hash_specialization_multiple_add() {
u64
);
}
#[test]
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
fn alias_member_specialization() {
assert_evals_to!(
indoc!(
r#"
app "test" provides [ main ] to "./platform"
Hash has
hash : a -> U64 | a has Hash
Id := U64
hash = \$Id n -> n
main =
aliasedHash = hash
aliasedHash ($Id 1234)
"#
),
1234,
u64
);
}