Remove explain-phase assertion which is in fact reachable #3758
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #3755, by deleting some defensive code which I wrote to defend against implementation bugs and thought was unreachable in normal use. Obviously that turned out to be wrong! So, how can you reach that?
The relevant loop is replacing an infix of our test buffer, for example taking
AA XX BB
and tryingAA YY BB
. However, the length can vary by contents, so the test might try to read off the end of the buffer:AA YYB B-
. In this case, we'll try fixing it up asAA YYB BB
- and my incorrect assert was that we'd have exactly this buffer from the rerun. However, it's possible for the infix to first overflow, and then have part of the infix dropped by the canonicalisation logic (e.g. because of a filter) - so the final buffer is actually (e.g.)AA YB BB
. This is in fact working as intended, so deleting the oversensitive check is a complete solution 😅