Reputation: 21
if let equatableObj = newFirstItem as? Equatable {
// do something
}
error message: Error:(140, 64) protocol 'Equatable' can only be used as a generic constraint because it has Self or associated type requirements
How do i solve it?
Upvotes: 1
Views: 121
Reputation: 3885
I just found a very detailed post about this topic at Swift by Sundell
Upvotes: 0