Created
August 28, 2017 15:03
-
-
Save vhart/7ba870b2868759c0b20eba098f3ce600 to your computer and use it in GitHub Desktop.
Show error that results in wrapping abstract protocol with associated type requirements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DeserializerBox<D: JsonDeserializer> { | |
let deserializer: D | |
init(deserializer: D) { | |
self.deserializer = deserializer | |
} | |
} | |
class Session<P>: NetworkSession { | |
typealias Payload = P | |
let deserializer: DeserializerBox | |
init(deserializer: DeserializerBox) { | |
self.deserializer = deserializer | |
} | |
func get(url: URL, parameters: [String: String], onComplete: (Result<P, NetworkError>) -> Void) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment