Skip to content

Commit

Permalink
Add typeid check
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinTF committed Feb 18, 2025
1 parent dc5d2c4 commit aa82823
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/engine/Operation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,11 @@ uint64_t Operation::getSizeEstimate() {
// _____________________________________________________________________________
std::unique_ptr<Operation> Operation::clone() const {
auto result = cloneImpl();
auto compareTypes = [this, &result]() {
const auto& reference = *result;
return typeid(*this) == typeid(reference);
};
AD_CORRECTNESS_CHECK(compareTypes());
AD_CORRECTNESS_CHECK(result->_executionContext == _executionContext);
auto areChildrenDifferent = [this, &result]() {
auto ownChildren = getChildren();
Expand Down

0 comments on commit aa82823

Please sign in to comment.