-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Use conditional conformances to implement Equatable for Optional, Array, and Dictionary #13046
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
Use conditional conformances to implement Equatable for Optional, Array, and Dictionary #13046
Conversation
77fe865
to
b95a71c
Compare
@swift-ci please test |
1 similar comment
@swift-ci please test |
72592e4
to
c82ff04
Compare
@swift-ci please test |
1 similar comment
@swift-ci please test |
Build failed |
Build failed |
@swift-ci please test source compatibility |
1 similar comment
@swift-ci please test source compatibility |
Ah, the source compatibility failure in Kickstarter is real, and caused by the XCTest changes:
I've captured the overloading issue in https://bugs.swift.org/browse/SR-6472. |
c82ff04
to
5becd92
Compare
@swift-ci please smoke test |
@swift-ci please test source compatibility |
@swift-ci please smoke test |
But UPASS’s. Ready to go in pending core team approval |
XCTest had XCAssert(Not)Equal overloads for optionals, arrays (including contiguous arrays and array slices), and dictionaries to work around the lack of conditional conformances to Equatable. Now that we have the latter, remove the former. Fixes rdar://problem/17924430.
5becd92
to
887ad4a
Compare
Rebased and ChangeLog'd. |
@swift-ci please smoke test |
1 similar comment
@swift-ci please smoke test |
Equatable for two dimension array is still not working (e.g. I used the swift-4.1-DEVELOPMENT-SNAPSHOT-2017-11-30-a-osx to test:
|
You'll need a snapshot from master, or wait until we get a snapshot from a rebranched Swift 4.1 (which will be available in a day or two), to get this feature. |
Proposal: SE-0143. |
Introduce conditional conformances to
Equatable
forOptional
,Array
, andDictionary
.Fixes rdar://problem/21504479, rdar://problem/32035512, and rdar://problem/17924430.