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.
More Related Contents:
- Protocol doesn’t conform to itself?
- What is the in-practice difference between generic and protocol-typed function parameters?
- Swift generics not preserving type
- A Swift protocol requirement that can only be satisfied by using a final class
- Protocol func returning Self
- “The file “MyApp.app” couldn’t be opened because you don’t have permission to view it” when running app in Xcode 6 Beta 4
- Why can’t a get-only property requirement in a protocol be satisfied by a property which conforms?
- Protocol can only be used as a generic constraint because it has Self or associatedType requirements
- how to save and read array of array in NSUserdefaults in swift?
- Swift protocol with “where Self” clause
- How do I store a value of type Class in a Dictionary of type [String:Class] in Swift?
- How can I make a weak protocol reference in ‘pure’ Swift (without @objc)
- Swift Beta performance: sorting arrays
- Non-‘@objc’ method does not satisfy optional requirement of ‘@objc’ protocol
- Changing the Status Bar Color for specific ViewControllers using Swift in iOS8
- Using a Type Variable in a Generic
- Extend array types using where clause in Swift
- Use a generic class as a custom view in Interface Builder
- How flatMap API contract transforms Optional input to Non Optional result?
- Usage of protocols as array types and function parameters in swift
- How do I import a Swift file from another Swift file?
- Why do Self and self sometimes refer to different types in static functions?
- How to use openURL for making a phone call in Swift?
- Unable to run app in Simulator : An error was encountered while running (Domain = LaunchServicesError, Code = 0)
- Generic function taking a type name in Swift
- Swift beta 6 – Confusing linker error message
- why do i get “Must translate autoresizing mask into constraints to have _setHostsLayoutEngine:YES” in xcode 6 beta
- Default value for optional generic parameter in Swift function
- Swift Protocol inheritance and protocol conformance issue
- Class ‘ViewController’ has no initializers in swift