diff --git a/runtime/Cpp/runtime/src/TokenStreamRewriter.cpp b/runtime/Cpp/runtime/src/TokenStreamRewriter.cpp index e281b19cc..0ac47d33f 100755 --- a/runtime/Cpp/runtime/src/TokenStreamRewriter.cpp +++ b/runtime/Cpp/runtime/src/TokenStreamRewriter.cpp @@ -348,7 +348,6 @@ std::unordered_map TokenStreamRe } // throw exception unless disjoint or identical bool disjoint = prevRop->lastIndex < rop->index || prevRop->index > rop->lastIndex; - bool same = prevRop->index == rop->index && prevRop->lastIndex == rop->lastIndex; // Delete special case of replace (text==null): // D.i-j.u D.x-y.v | boundaries overlap combine to max(min)..max(right) if (prevRop->text.empty() && rop->text.empty() && !disjoint) { @@ -358,7 +357,7 @@ std::unordered_map TokenStreamRe rop->lastIndex = std::max(prevRop->lastIndex, rop->lastIndex); std::cout << "new rop " << rop << std::endl; } - else if (!disjoint && !same) { + else if ( !disjoint ) { throw IllegalArgumentException("replace op boundaries of " + rop->toString() + " overlap with previous " + prevRop->toString()); }