# HG changeset patch # User Paul Boddie # Date 1490030880 -3600 # Node ID 125fb66325859f4b5152ab295b41c60c3cf04aea # Parent bcb741e16ed8f74535cca8888dfc4d2b95354231 Prevent references from being associated with incomplete accesses. diff -r bcb741e16ed8 -r 125fb6632585 translator.py --- a/translator.py Mon Mar 20 17:58:38 2017 +0100 +++ b/translator.py Mon Mar 20 18:28:00 2017 +0100 @@ -630,6 +630,17 @@ """ access_location = self.deducer.const_accesses.get(location) + + # Determine whether any deduced references refer to the accessed + # attribute. + + path, accessor_name, attrnames, access_number = location + attrnames = attrnames and attrnames.split(".") + remaining = attrnames and len(attrnames) > 1 + + if remaining and not access_location: + return [] + refs = [] l = self.deducer.referenced_attrs.get(access_location or location) if l: