Skip to content

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

Open
@swift-ci

Description

@swift-ci
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EquatableArea → standard library: The `Equatable` protocolcompilerThe Swift compiler itselfconditional conformancesFeature → protocol → conformances: conditional conformancesconformancesFeature → protocol: protocol conformancesderived conformancesFeature → protocol → conformances: derived conformances aka synthesized conformancesfeatureA feature request or implementationswift evolution proposal neededFlag → feature: A feature that warrants a Swift evolution proposaltuplesFeature: tuplestypesFeature: types

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions