# HG changeset patch # User Paul Boddie # Date 1489092499 -3600 # Node ID a9914b9b23d25e2ec606e0c511d49024e2d2ab12 # Parent c94d43f85d6f105720547da262eea1f0d8caf045 Only record alias reference types for accesses involving one attribute name. diff -r c94d43f85d6f -r a9914b9b23d2 deducer.py --- a/deducer.py Wed Mar 08 14:53:01 2017 +0100 +++ b/deducer.py Thu Mar 09 21:48:19 2017 +0100 @@ -1680,10 +1680,21 @@ access_location = self.const_accesses[access_location] location, name, attrnames, access_number = access_location + attrnames = attrnames and attrnames.split(".") + remaining = attrnames and len(attrnames) > 1 + + # Alias has remaining attributes: reference details do not + # correspond to the accessor; the remaining attributes would + # need to be traversed first. + + if remaining: + return # Alias references an attribute access. - if attrnames: + attrname = attrnames and attrnames[0] + + if attrname: attrs = [] for attrtype, object_type, attr in self.referenced_attrs[access_location]: attrs.append(attr)