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

[SR-1997] Tuples with optional parameter aren't equatable #44606

Closed
swift-ci opened this issue Jul 6, 2016 · 3 comments
Closed

[SR-1997] Tuples with optional parameter aren't equatable #44606

swift-ci opened this issue Jul 6, 2016 · 3 comments
Labels
compiler The Swift compiler in itself conditional conformances Feature → protocol → conformances: conditional conformances conformances Feature → protocol: protocol conformances derived conformances Feature → protocol → conformances: derived conformances aka synthesized conformances duplicate Resolution: Duplicates another issue Equatable Area → standard library: The `Equatable` protocol feature A feature request or implementation swift evolution proposal needed Flag → feature: A feature that warrants a Swift evolution proposal tuples Feature: tuples

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Jul 6, 2016

Previous ID SR-1997
Radar None
Original Reporter amayers (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate
Environment

OS X 10.11.5
Xcode 8 beta 2 (8S162m)

Additional Detail from JIRA
Votes 1
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 22445faabc481578bd03617f130d0545

duplicates:

  • SR-1222 A tuple of Equatable types should be Equatable

relates to:

  • SR-1482 Compare arrays of optionals
  • SR-1535 No == overload exists for comparing optional arrays.

Issue Description:

If any of the parameters in a tuple are optional that tuple is no longer equatable. Since making an equatable item optional doesn't effect it's equability, you would expect that making the tuple have an optional parameter shouldn't effect it's equability either.

@Dante-Broggi
Copy link
Contributor

Dante-Broggi commented Jul 16, 2018

Should this bug be closed, as (T?, U) where T: Equatable, U: Equatable now has an implementation for ==, or remain open because they are still not themselves Equatable?

@belkadan
Copy link
Contributor

Let's keep this for true recursive conditional Equatable conformance for tuples.

@belkadan
Copy link
Contributor

Actually, in that case maybe this is better tracked by SR-1222.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added duplicate Resolution: Duplicates another issue feature A feature request or implementation swift evolution proposal needed Flag → feature: A feature that warrants a Swift evolution proposal conformances Feature → protocol: protocol conformances derived conformances Feature → protocol → conformances: derived conformances aka synthesized conformances conditional conformances Feature → protocol → conformances: conditional conformances Equatable Area → standard library: The `Equatable` protocol tuples Feature: tuples and removed bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. labels Jan 29, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler in itself conditional conformances Feature → protocol → conformances: conditional conformances conformances Feature → protocol: protocol conformances derived conformances Feature → protocol → conformances: derived conformances aka synthesized conformances duplicate Resolution: Duplicates another issue Equatable Area → standard library: The `Equatable` protocol feature A feature request or implementation swift evolution proposal needed Flag → feature: A feature that warrants a Swift evolution proposal tuples Feature: tuples
Projects
None yet
Development

No branches or pull requests

4 participants