Skip to content

[stdlib] Collection compatibility shim fixes #14342

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

Conversation

airspeedswift
Copy link
Member

A couple of the compatibility shims for the removal of Collection.IndexDistance weren't matching the signatures of the methods they were shimming, causing infinite recursion when called (because they were calling themselves). This fixes that and adds tests to confirm they're working.

@airspeedswift
Copy link
Member Author

@swift-ci please test and merge


CollectionDistance.test("Int16/advance") {
let c = MyCollection<Int>(_elements: [1,2,3])
let d: Int16 = 1
Copy link
Member Author

Choose a reason for hiding this comment

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

Note, these shims can't be constrained to the specific old IndexDistance type, they'll work with any integer type.

@airspeedswift
Copy link
Member Author

@swift-ci please test linux platform

@airspeedswift airspeedswift merged commit c1d4b60 into swiftlang:master Feb 2, 2018
airspeedswift added a commit to airspeedswift/swift that referenced this pull request Feb 6, 2018
* Fix compatibility shims for IndexDistance

* Add a second test for implied IndexDistance, Bidirectional conformance
airspeedswift added a commit that referenced this pull request Feb 7, 2018
…shims (#14444)

* [stdlib] Collection compatibility shim fixes (#14342)

* Fix compatibility shims for IndexDistance

* Add a second test for implied IndexDistance, Bidirectional conformance

* Merge pull request #14414 from airspeedswift/move-collection-compat
airspeedswift added a commit to airspeedswift/swift that referenced this pull request Feb 8, 2018
…shims (swiftlang#14444)

* [stdlib] Collection compatibility shim fixes (swiftlang#14342)

* Fix compatibility shims for IndexDistance

* Add a second test for implied IndexDistance, Bidirectional conformance

* Merge pull request swiftlang#14414 from airspeedswift/move-collection-compat
airspeedswift added a commit that referenced this pull request Feb 8, 2018
…shims (#14444) (#14476)

* [stdlib] Collection compatibility shim fixes (#14342)

* Fix compatibility shims for IndexDistance

* Add a second test for implied IndexDistance, Bidirectional conformance

* Merge pull request #14414 from airspeedswift/move-collection-compat
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.

1 participant