How was Proposal: SE-0185 implemented under the hood?

63 views Asked by At

Synthesizing Equatable and Hashable conformance.

I would like to take a look at source code where it is implemented. But I can't find it at https://github.com/apple/swift/
Particularly I'm interested in:

we propose that a type synthesize conformance to Equatable/Hashable if all of its members are Equatable/Hashable

How do they check whether all of its members are Equatable/Hashable?

Actually I want to write my own extension. I want to synthesize Comparable conformance if there is only one member which is Comparable. Or to synthesize Equatable/Hashable conformance only based on Equatable/Hashable members. I think it will be pretty handy too.

0

There are 0 answers