This is because hashing is defined in terms of equality, and is meaningless without it.
Hashing -- by definition -- works by mapping arbitrary types into a fixed-width bit sequence, which is usually modeled as an integer value.
But this is not how Hashable
works -- you are supposed to implement hash(into:)
, not hashValue
. See SE-0206 for the full explanation for this.