{"action":"created","issue":{"url":"https://api.github.com/repos/thoughtbot/Argo/issues/287","labels_url":"https://api.github.com/repos/thoughtbot/Argo/issues/287/labels{/name}","comments_url":"https://api.github.com/repos/thoughtbot/Argo/issues/287/comments","events_url":"https://api.github.com/repos/thoughtbot/Argo/issues/287/events","html_url":"https://github.com/thoughtbot/Argo/issues/287","id":115487897,"number":287,"title":"Decoding with protocol conformance","user":{"login":"mstfy","id":5105861,"avatar_url":"https://avatars.githubusercontent.com/u/5105861?v=3","gravatar_id":"","url":"https://api.github.com/users/mstfy","html_url":"https://github.com/mstfy","followers_url":"https://api.github.com/users/mstfy/followers","following_url":"https://api.github.com/users/mstfy/following{/other_user}","gists_url":"https://api.github.com/users/mstfy/gists{/gist_id}","starred_url":"https://api.github.com/users/mstfy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstfy/subscriptions","organizations_url":"https://api.github.com/users/mstfy/orgs","repos_url":"https://api.github.com/users/mstfy/repos","events_url":"https://api.github.com/users/mstfy/events{/privacy}","received_events_url":"https://api.github.com/users/mstfy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-06T11:26:47Z","updated_at":"2015-11-06T15:56:00Z","closed_at":null,"body":"Hello. I have a protocol to represent api endpoint. Inside protocol there is ResourceType declaration which represents the model object that will be returned from server. It also conforms `Decodable` protocol.\r\n\r\n    protocol EndPointType {\r\n        typealias ResourceType: Decodable\r\n    }\r\n\r\nInside protocol extension I have a function that parses response to `ResourceType`. Here is the function\r\n\r\n    extension EndPointType {\r\n        private func parseResponse(response: AnyObject) -> Result<ResourceType, NetworkError> {\r\n            let result: Decoded<ResourceType> = decode(response)\r\n            switch result {\r\n            case .Failure: return Result.Failure(NetworkError.IncorrectDataReturned)\r\n            case .Success(let value): return Result.Success(value)\r\n            }\r\n        }\r\n    }\r\n\r\nBut on first line compiler gives error. `Ambiguous reference to member decode`. So what am I missing here?\r\n"},"comment":{"url":"https://api.github.com/repos/thoughtbot/Argo/issues/comments/154446929","html_url":"https://github.com/thoughtbot/Argo/issues/287#issuecomment-154446929","issue_url":"https://api.github.com/repos/thoughtbot/Argo/issues/287","id":154446929,"user":{"login":"mstfy","id":5105861,"avatar_url":"https://avatars.githubusercontent.com/u/5105861?v=3","gravatar_id":"","url":"https://api.github.com/users/mstfy","html_url":"https://github.com/mstfy","followers_url":"https://api.github.com/users/mstfy/followers","following_url":"https://api.github.com/users/mstfy/following{/other_user}","gists_url":"https://api.github.com/users/mstfy/gists{/gist_id}","starred_url":"https://api.github.com/users/mstfy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstfy/subscriptions","organizations_url":"https://api.github.com/users/mstfy/orgs","repos_url":"https://api.github.com/users/mstfy/repos","events_url":"https://api.github.com/users/mstfy/events{/privacy}","received_events_url":"https://api.github.com/users/mstfy/received_events","type":"User","site_admin":false},"created_at":"2015-11-06T15:56:00Z","updated_at":"2015-11-06T15:56:00Z","body":"Yeah I completly miss that DecodedType typealias. Thank you"}}