I want to get the hash value of an Any
object that conforms to Hashable.
However, with this code:
let anyValue: Any
//...
if let h = anyValue as? Hashable {
return h.hashValue
}
I'm getting this error
Protocol 'Hashable' can only be used as a generic constraint because it has Self or associated type requirements