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-1222] A tuple of Equatable types should be Equatable #43830

Open
swift-ci opened this issue Apr 13, 2016 · 2 comments
Open

[SR-1222] A tuple of Equatable types should be Equatable #43830

swift-ci opened this issue Apr 13, 2016 · 2 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 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

Previous ID SR-1222
Radar rdar://problem/13822406
Original Reporter svanimpe (JIRA User)
Type New Feature

Attachment: Download

Environment

Xcode 7.3

Additional Detail from JIRA
Votes 11
Component/s Compiler
Labels New Feature
Assignee None
Priority Medium

md5: 737b988db4d23991ee46fada4989dfd8

is duplicated by:

  • SR-1997 Tuples with optional parameter aren't equatable
  • SR-4191 Compiler cannot resolve equatable tuples if they are an associatedtype of a protocol
  • SR-6355 Tuples of Equatable should be Equatable
  • SR-6802 Tuples of Equatable types aren't Equatable
  • SR-7942 Automatic conformance for tuples with Equatable member types

relates to:

  • SR-8281 enums with associated tuple values can not automatically implement Equatable
  • SR-9925 Void is not equatable (enum cases with Void associated values can't auto-synthesise Equatable)

Issue Description:

As the attached screenshots show: the method `contains(_: Self.Generator.Element) -> Bool` is not available for arrays of tuples. Its counterpart that takes a predicate is available. The same is true for the `indexOf` methods.

@belkadan
Copy link
Contributor

Tuples don't conform to Equatable, so there's no valid implementation of contains.

@swift-ci
Copy link
Collaborator Author

Comment by Steven Van Impe (JIRA)

That's really confusing now that == works. Please consider this bug report a feature request 🙂

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added feature A feature request or implementation conformances Feature → protocol: protocol conformances derived conformances Feature → protocol → conformances: derived conformances aka synthesized conformances Equatable Area → standard library: The `Equatable` protocol tuples Feature: tuples swift evolution proposal needed Flag → feature: A feature that warrants a Swift evolution proposal conditional conformances Feature → protocol → conformances: conditional conformances and removed new feature labels Jan 29, 2023
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 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

3 participants