Separate ability members and their specializations in reference checking

This commit is contained in:
Ayaz Hafiz 2022-07-26 14:33:27 -04:00
parent 7a4c57d3dc
commit 41eb3ad9a4
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
3 changed files with 1 additions and 10 deletions

View file

@ -1568,13 +1568,6 @@ fn canonicalize_var_lookup(
output.references.insert_value_lookup(symbol);
if scope.abilities_store.is_ability_member_name(symbol) {
// Is there a shadow implementation with the same name? If so, we might be in
// the def for that shadow. In that case add a value lookup of the shadow impl,
// so that it's marked as possibly-recursive.
if let Some(shadow) = scope.get_member_shadow(symbol) {
output.references.insert_value_lookup(shadow.value);
}
AbilityMember(
symbol,
Some(scope.abilities_store.fresh_specialization_id()),

View file

@ -206,7 +206,6 @@ pub fn canonicalize_def_header_pattern<'a>(
// Likely a specialization of an ability.
Some(ability_member_name) => {
output.references.insert_bound(symbol);
output.references.insert_value_lookup(ability_member_name);
Pattern::AbilityMemberSpecialization {
ident: symbol,
specializes: ability_member_name,