Skip to content

Special-case comparisons of ranges in __checkBinaryOperation(). #640

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Aug 22, 2024

This PR adds an overload of __checkBinaryOperation() that is used when the inputs are range expressions. Ranges do not play well with collection diffing so we want to disable that functionality for them.

Resolves #639.
Resolves rdar://131122002.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

@grynspan
Copy link
Contributor Author

@swift-ci test

This PR adds an overload of `__checkBinaryOperation()` that is used when the
inputs are range expressions. Ranges do not play well with collection diffing
so we want to disable that functionality for them.

Resolves #639.
Resolves rdar://131122002.

Co-authored-by: @ricky-sharp
@grynspan grynspan force-pushed the jgrynspan/131122002-range-diffing-hang branch from 2e2b210 to 4e35ff1 Compare August 22, 2024 22:01
@grynspan
Copy link
Contributor Author

@swift-ci test

@ricky-sharp
Copy link

Thank you again so much for identifying the issue so quickly and generating this fix!

@grynspan grynspan merged commit 60784ff into main Aug 23, 2024
3 checks passed
@grynspan grynspan deleted the jgrynspan/131122002-range-diffing-hang branch August 23, 2024 17:48
@grynspan grynspan added this to the Swift 6.1 milestone Sep 10, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug 🪲 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

#expect will hang or crash when comparing unequal ClosedRange values
4 participants