You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But if the protocol is marked as @objc, it generates the warning "Method cannot be a member of an @objc protocol because its result type cannot be represented in Objective-C"
However, adding Self as a return type to a protocol method doesn't usually treat Self as an associatedType requirement, so it's not clear why a protocol method returning Self can't be represented in Objective-C.
The equivalent Objective-C code is permitted and works as you'd expect: