# HG changeset patch # User Paul Boddie # Date 1490050526 -3600 # Node ID 7771170913980fd8678547b343500081e0a073da # Parent 44ea0968a550b34430ec24bccd7f8b390ceceb9c Obtain static final attribute details for access results. diff -r 44ea0968a550 -r 777117091398 translator.py --- a/translator.py Mon Mar 20 23:51:24 2017 +0100 +++ b/translator.py Mon Mar 20 23:55:26 2017 +0100 @@ -629,7 +629,18 @@ identified attributes. """ - access_location = self.deducer.const_accesses.get(location) + # Find any static attribute. + + plan = self.deducer.access_plans.get(location) + if plan: + name, test, test_type, base, \ + traversed, traversal_modes, remaining, \ + context, context_test, \ + first_method, final_method, \ + origin, accessor_kinds = plan + + if origin: + return [self.importer.get_object(origin)] # Determine whether any deduced references refer to the accessed # attribute. @@ -638,6 +649,8 @@ attrnames = attrnames and attrnames.split(".") remaining = attrnames and len(attrnames) > 1 + access_location = self.deducer.const_accesses.get(location) + if remaining and not access_location: return []