Protocol Observing
inherits from protocol Hashable
, which in turn inherits from protocol Equatable
. Protocol Equatable
has the following requirement:
func ==(lhs: Self, rhs: Self) -> Bool
And a protocol that contains Self
somewhere inside it cannot be used anywhere except in a type constraint.
Here is a similar question.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…