Fix a problem with reporting errors from merging port properties
@@ -757,12 +757,8 @@ class MergePortProperties(object):
node.add_child(merged)
def merge_properties(self, mergelist):
- prioritized = mergelist[0]
- for merger in mergelist[1:]:
- prioritized = self._merge_two(prioritized, merger)
- return prioritized
- def _merge_two(self, left, right):
+ def _merge_two(left, right):
lval = left.arg.value
rval = right.arg.value
if lval == rval:
@@ -788,6 +784,12 @@ class MergePortProperties(object):
left.arg.value = merged_val
return left
+ prioritized = mergelist[0]
+ for merger in mergelist[1:]:
+ prioritized = _merge_two(prioritized, merger)
+ return prioritized
+
+
class ConsolidatePortProperty(object):
"""
