I want to pass Generic protocol as a parameter for another protocol.
protocol OperationDelegate {
associatedtype T
func onOperationFinished(result:Array<T>)
func onOperationError(error:OperationError, errorMessage:String)
}
protocol ResultDelegate {
func findResult(query: String,odelegate: OperationDelegate<MyOwnDataType>)
}
How to pass the Generic protocol as a parameter for another protocol
I got following error
Protocol 'OperationDelegate' can only be used as a generic constraint because it has Self or associated type requirements