Avoid nasty side effects in creation of Node

This issue led to bugs in Jedi, because Jedi used the nodes in a wrong way.
This commit is contained in:
Dave Halter
2019-01-01 23:35:20 +01:00
parent 29325d3052
commit c7c464e5e9
5 changed files with 16 additions and 9 deletions

View File

@@ -60,7 +60,7 @@ def _assert_valid_graph(node):
assert node.start_pos == actual, (node.start_pos, actual)
else:
for child in children:
assert child.parent == node
assert child.parent == node, (node, child)
_assert_valid_graph(child)