Skip to content

[5.5][stdlib] fix an accidental recursion bug involving Collection #38195

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

Merged
merged 1 commit into from
Jul 6, 2021

Conversation

glessard
Copy link
Contributor

@glessard glessard commented Jul 1, 2021

This is a cherry-pick of #38161 to the 5.5 branch.
Note that if this is not merged for some reason, we may also need to back out that change.

  • adds a default implementation of Collection’s subscript(bounds: Range<_>) with the most general signature possible
  • it is marked unavailable in order to prevent the infinite recursion bug reported in SR-14848
  • Collections whose SubSequence is Slice still get the proper default.

Resolves SR-14848 (rdar://79891982)

- adds a default implementation of Collection’s subscript(bounds: Range<_>)
  with the most general signature possible
- it is marked unavailable in order to prevent the
  infinite recursion bug reported in SR-14848
- Collections whose SubSequence is Slice<Self> still get the proper default, as intended.
@glessard glessard requested a review from kylemacomber July 1, 2021 14:13
@glessard glessard requested a review from a team as a code owner July 1, 2021 14:13
@glessard
Copy link
Contributor Author

glessard commented Jul 1, 2021

@swift-ci please smoke test

@glessard glessard changed the title [stdlib] fix an accidental recursion bug involving Collection [5.5][stdlib] fix an accidental recursion bug involving Collection Jul 1, 2021
@glessard
Copy link
Contributor Author

glessard commented Jul 1, 2021

@swift-ci please test Windows platform

@glessard
Copy link
Contributor Author

glessard commented Jul 1, 2021

@swift-ci please test

@glessard glessard added the r5.5 label Jul 1, 2021
@glessard glessard merged commit 6437e5c into swiftlang:release/5.5 Jul 6, 2021
@glessard glessard deleted the sr14848-5.5 branch July 6, 2021 22:03
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.5 labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants