The existing unit test had an incorrect expectation in what happens after splicing an existing range. Fixing the unit test revealed an actual bug in the RangeMap implementation. It should never modify the lower bound of an existing interval, because that invalidates the iterator. It should also never retain a pointer or reference to a range when the range is potentially removed by subsequent codelines.
4.3 KiB
4.3 KiB