1.1 --- a/translator.py Mon Mar 20 23:51:24 2017 +0100
1.2 +++ b/translator.py Mon Mar 20 23:55:26 2017 +0100
1.3 @@ -629,7 +629,18 @@
1.4 identified attributes.
1.5 """
1.6
1.7 - access_location = self.deducer.const_accesses.get(location)
1.8 + # Find any static attribute.
1.9 +
1.10 + plan = self.deducer.access_plans.get(location)
1.11 + if plan:
1.12 + name, test, test_type, base, \
1.13 + traversed, traversal_modes, remaining, \
1.14 + context, context_test, \
1.15 + first_method, final_method, \
1.16 + origin, accessor_kinds = plan
1.17 +
1.18 + if origin:
1.19 + return [self.importer.get_object(origin)]
1.20
1.21 # Determine whether any deduced references refer to the accessed
1.22 # attribute.
1.23 @@ -638,6 +649,8 @@
1.24 attrnames = attrnames and attrnames.split(".")
1.25 remaining = attrnames and len(attrnames) > 1
1.26
1.27 + access_location = self.deducer.const_accesses.get(location)
1.28 +
1.29 if remaining and not access_location:
1.30 return []
1.31