Skip to content

[stdlib] Fix type inference issue for BidirectionalCollection #3510

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 2 commits into from
Jul 14, 2016

Conversation

natecook1000
Copy link
Member

What's in this pull request?

This change makes it possible to conform to BidirectionalCollection with only the minimal protocol requirements.

Resolved bug number: (SR-1922)


Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

Triggering Swift CI

The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:

Smoke Testing

Platform Comment
All supported platforms @swift-ci Please smoke test
All supported platforms @swift-ci Please smoke test and merge
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
All supported platforms @swift-ci Please test and merge
OS X platform @swift-ci Please test OS X platform
OS X platform @swift-ci Please benchmark
Linux platform @swift-ci Please test Linux platform

Lint Testing

Language Comment
Python @swift-ci Please Python lint

Note: Only members of the Apple organization can trigger swift-ci.

This resolves the issue described in SR-1922, where conformance
to a bidirectional collection gives errors when implemented using
only the minimal protocol requirements.
@natecook1000
Copy link
Member Author

@swift-ci Please test

@gribozavr
Copy link
Contributor

@natecook1000 Thank you! Could you move the test to validation-test/stdlib/CollectionType.swift.gyb? This way we will test all compiler stages (and will avoid adding a new file to the testsuite.)

@@ -0,0 +1,29 @@
// RUN: %target-parse-verify-swift

struct FatalIndex : Comparable { }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a comment that explains what the test is checking (that you can supply a minimal list of requirements).

@natecook1000 natecook1000 force-pushed the nc-bidirectionalfix branch 2 times, most recently from ffb8ffa to c1db683 Compare July 14, 2016 07:22
@natecook1000 natecook1000 force-pushed the nc-bidirectionalfix branch from c1db683 to 3d2d342 Compare July 14, 2016 07:23
@CodaFi
Copy link
Contributor

CodaFi commented Jul 14, 2016

@swift-ci please test and merge.

@gribozavr gribozavr merged commit 4b01574 into swiftlang:master Jul 14, 2016
@natecook1000 natecook1000 deleted the nc-bidirectionalfix branch July 14, 2016 16:54
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.

3 participants