# HG changeset patch # User Paul Boddie # Date 1529858637 -7200 # Node ID cab08f354ecb8b2501074a90da3a8c4724d8c274 # Parent fc7f612df68dc5d834410e5f025ec3c1a29f3b5d Fixed alias retrieval for name accesses which had been using the wrong kind of location to consult the alias index. diff -r fc7f612df68d -r cab08f354ecb translator.py --- a/translator.py Sun Jun 24 18:43:39 2018 +0200 +++ b/translator.py Sun Jun 24 18:43:57 2018 +0200 @@ -1631,10 +1631,22 @@ "Return alias references for the given 'name_ref'." location = name_ref.access_location() - - refs = self.deducer.referenced_objects.get(location) - refs = refs or self.deducer.accessor_all_types.get(location) - return AliasResult(name_ref, refs or set(), location) + accessor_locations = self.deducer.access_index.get(location) + + if not accessor_locations: + return None + + refs = set() + + for accessor_location in accessor_locations: + alias_refs = self.deducer.referenced_objects.get(accessor_location) + if alias_refs: + refs.update(alias_refs) + + if refs: + return AliasResult(name_ref, refs, location) + else: + return None def make_volatile(self, name):