Merged
Conversation
Contributor
|
Thanks for finishing this so quickly! I'll wait for it to pass and then merge, confirm, and do 0.97.1. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
@devyn found that #13595, which made ranges be type-checked at parse time, introduced a bug that caused
../footo be parsed as a string rather than a command call. This was caused byparse_rangereturning aSomedespite there being parse errors (/foodoesn't matchSyntaxShape::Number). To go back to the old behavior,parse_rangenow returnsNoneanytime there's any parse errors met while parsing the range.Unfortunately, this means that something like
..$foowill be parsed as a string if$fooisn't defined and as a range if it is defined. That was the behavior before #13595, and it should probably be fixed at some point, but I'm just trying to quickly fix the bug.User-Facing Changes
Things should go back to the way they were before #13595, except the type-checking stuff from that PR is still here.
Tests + Formatting
Added a test. Reverted another test that tests that
0..<$dayis parsed successfully as a string if the variable isn't defined.After Submitting