Merge pull request #3589 from rtfeldman/can-abilities3

Canonicalize syntactic abilities: Part 3 - solving
This commit is contained in:
Ayaz 2022-07-25 21:48:14 -05:00 committed by GitHub
commit 6b6f240acb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 594 additions and 274 deletions

View file

@ -1568,6 +1568,13 @@ 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()),