fix crash in preview mode with --line-length=1 #4086
Merged
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 #4062
crash happened when right_hand_split first split
to
and then left_hand_split followed up with splitting on the invisible LPAR around the return type in the first line to make it
This was due to insufficient logic in left_hand_split to abort in some weird cases, that it previously never got into because the code wasn't modified by
right_hand_split
beforehand - but that became a thing in #3916.Description
Checklist - did you ...
CHANGES.md
if necessary?