[SR-10299] RangeExpression's relative(to:) crashes on partial ranges #52699
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
standard library
Area: Standard library umbrella
Environment
Playground running on XCode 10.2 GM
Additional Detail from JIRA
md5: 1658d7d4fcd057072ea901fa5d7d095b
Issue Description:
I noticed that if you have a partial range and you call relative(to🙂 with a collection that does not contain the range's specified bound you get a fatalError
This is a simple playground that shows the problem:
The playground will crash on the first relative(to🙂 call but if you comment that out it crashes on the next and so on.
I have found a simple fix for the issue and am submitting a pull request with the change and tests that would crash as it is now.
The text was updated successfully, but these errors were encountered: