1.1 --- a/micropython/data.py Mon Mar 05 00:25:11 2012 +0100
1.2 +++ b/micropython/data.py Sun Mar 11 01:49:53 2012 +0100
1.3 @@ -421,6 +421,16 @@
1.4 user._attrtypes = self._deduce_types(user._attrcombined, objtable)
1.5 self._finalise_contributor(user, objtable)
1.6
1.7 + def _finalise_contributors(self, node, objtable):
1.8 +
1.9 + """
1.10 + Visit the contributing branches of 'node', finalising them using the
1.11 + given 'objtable'.
1.12 + """
1.13 +
1.14 + for contributor in node._attrbranches:
1.15 + self._finalise_contributor(contributor, objtable)
1.16 +
1.17 def _finalise_contributor(self, node, objtable):
1.18
1.19 """
1.20 @@ -428,15 +438,14 @@
1.21 program unit.
1.22 """
1.23
1.24 - if not hasattr(node, "_attrtypes"):
1.25 + if not hasattr(node, "_attrspecifictypes"):
1.26 merged = {}
1.27 for user in node._attrdefs:
1.28 merged.update(user._attrnames)
1.29 node._attrmerged = combine_mapping_dicts(deepen_mapping_dict(node._attrnames), deepen_mapping_dict(merged))
1.30 - node._attrtypes = self._deduce_types(node._attrmerged, objtable)
1.31 -
1.32 - for contributor in node._attrbranches:
1.33 - self._finalise_contributor(contributor, objtable)
1.34 + node._attrspecifictypes = self._deduce_types(node._attrmerged, objtable)
1.35 +
1.36 + self._finalise_contributors(node, objtable)
1.37
1.38 def _deduce_types(self, usage, objtable):
1.39