Skip to content
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

[SE-0157] [Collections] Constrain Indices type to Collection. #11918

Closed
wants to merge 6 commits into from

Conversation

DougGregor
Copy link
Member

@DougGregor DougGregor commented Sep 14, 2017

Make the Indices associated types conform to the appropriate Collection protocol:

  • Collection.Indices: Collection
  • BidirectionalCollection.Indices: BidirectionalCollection
  • RandomAccessCollection.Indices: RandomAccessCollection

And clean up all of the now-redundant constraints. This builds on top of #11899. It fixes the remainder of SR-3453 that I don't find "suspicious".

When setting the signature conformances in a NormalProtocolConformance,
do so progressively rather than waiting until all of them are computed.
This allows later requirements to refer to earlier conformances.
…ection.

Introduce (recursive) constraints that make the *Collection constraint
of SubSequence match that of its enclosing *Collection, e.g.,
MutableCollection.SubSequence conforms to MutableCollection.

Fixes rdar://problem/20715031 and more of SR-3453.
Make the Indices types conform to the appropriate Collection protocol:
* Collection.Indices: Collection
* BidirectionalCollection.Indices: BidirectionalCollection
* RandomAccessCollection.Indices: RandomAccessCollection
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please test source compatibility

@DougGregor DougGregor changed the title [Collections] Constrain Indices type to Collection. [SE-0157] [Collections] Constrain Indices type to Collection. Sep 14, 2017
@DougGregor
Copy link
Member Author

I'm going to collect all of the standard library changes for SE-0157: Recursive Protocol Constraints in a single PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant