[poincare/tree_handle] Assert B is not an ancestor of A in replaceWithInPlace(A, B)

This commit is contained in:
Ruben Dashyan
2020-02-06 14:15:14 +01:00
committed by Léa Saviot
parent fffcadf384
commit 7d72d5abd7

View File

@@ -62,6 +62,7 @@ void TreeHandle::replaceChildInPlace(TreeHandle oldChild, TreeHandle newChild) {
if (oldChild == newChild) {
return;
}
assert(!oldChild.hasAncestor(newChild, true));
assert(!isUninitialized());