-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[stdlib] Limit ranged subscript default implementations #12582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This change limits the default implementations for subscript(Range<Index>) to collections where the SubSequence type matches the slice type that the implementation provides. This cuts down on the number of extraneous subscript overloads.
@swift-ci Please smoke test macOS platform |
@swift-ci Please test source compatibility |
@swift-ci please smoke test compiler performance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm assuming it doesn’t hurt compile times (hopefully improves them...)
@swift-ci Please smoke test Linux platform |
Closing as this is going to conflict with the conditional conformance improvements elsewhere. |
This change limits the default implementations for subscript(Range) to collections where the SubSequence type matches the slice type that the implementation provides. This cuts down on the number of extraneous subscript overloads. (Related to #12029.)