mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[poincare/tree_handle] Assert B is not an ancestor of A in replaceWithInPlace(A, B)
This commit is contained in:
committed by
Léa Saviot
parent
fffcadf384
commit
7d72d5abd7
@@ -62,6 +62,7 @@ void TreeHandle::replaceChildInPlace(TreeHandle oldChild, TreeHandle newChild) {
|
||||
if (oldChild == newChild) {
|
||||
return;
|
||||
}
|
||||
assert(!oldChild.hasAncestor(newChild, true));
|
||||
|
||||
assert(!isUninitialized());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user