protocol Eq { func eq(_ x: Self) -> Bool } func f(_ a: Eq, b: Eq) -> Bool { return a.eq(b) }
/Users/omochi/work/playground/TempGround.playground:5:13: Protocol 'Eq' can only be used as a generic constraint because it has Self or associated type requirementsprotocol Eq { func eq1() -> Self func eq2(_ x: Self) } func f(_ a: Eq) { }