Open WowbaggersLiquidLunch opened 3 years ago
submitted a draft PR #39047 https://github.com/apple/swift/pull/39047
I haven't had time in the past few months to continue working on this, and don't think I will be anytime soon, so I unassigned myself. If anyone wants to take over, please feel free to do so.
Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug, DerivedConformance | |Assignee | None | |Priority | Medium | md5: 7c4663ac0f4ead1b689e43c0ea8393a3relates to:
Issue Description:
Currently
Comparable
inherits fromEquatable
, but does not provide a default implementation for==
, so the compiler synthesizes one composed of member-wise==
s. This leads to a problem where if a type's<
is not composed of member-wise inequalities, then<
,>
, and==
can all evaluate tofalse
for some pairs of values, contradictingComparable
's documentation:For example:
Forums discussion: https://forums.swift.org/t/add-default-implementation-of-to-comparable/48832