{"action":"created","issue":{"url":"https://api.github.com/repos/thoughtbot/Argo/issues/492","repository_url":"https://api.github.com/repos/thoughtbot/Argo","labels_url":"https://api.github.com/repos/thoughtbot/Argo/issues/492/labels{/name}","comments_url":"https://api.github.com/repos/thoughtbot/Argo/issues/492/comments","events_url":"https://api.github.com/repos/thoughtbot/Argo/issues/492/events","html_url":"https://github.com/thoughtbot/Argo/issues/492","id":334258483,"node_id":"MDU6SXNzdWUzMzQyNTg0ODM=","number":492,"title":"Using pure can't compile using Swift 3","user":{"login":"juvs","id":204912,"node_id":"MDQ6VXNlcjIwNDkxMg==","avatar_url":"https://avatars2.githubusercontent.com/u/204912?v=4","gravatar_id":"","url":"https://api.github.com/users/juvs","html_url":"https://github.com/juvs","followers_url":"https://api.github.com/users/juvs/followers","following_url":"https://api.github.com/users/juvs/following{/other_user}","gists_url":"https://api.github.com/users/juvs/gists{/gist_id}","starred_url":"https://api.github.com/users/juvs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juvs/subscriptions","organizations_url":"https://api.github.com/users/juvs/orgs","repos_url":"https://api.github.com/users/juvs/repos","events_url":"https://api.github.com/users/juvs/events{/privacy}","received_events_url":"https://api.github.com/users/juvs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-20T21:36:11Z","updated_at":"2018-07-24T15:13:22Z","closed_at":null,"author_association":"NONE","body":"We migrate our code from Swift 2 to 3, but we get errors in structs that use \"pure\" function o set default values when the resulting transformation return nil values...\r\n\r\n### Error Messages\r\n\r\n_Cannot convert value of type 'Decoded<(String?) -> Carril>' to expected argument type 'Decoded<Carril>'_\r\n\r\n### Sample JSON\r\n\r\n```\r\n{\r\n  \"id\": 1,\r\n  \"nombre\": \"Test\",\r\n  \"descripcion\": \"None\"\r\n}\r\n```\r\n\r\n### Models\r\n\r\n```\r\nimport Argo\r\nimport Curry\r\nimport Runes\r\n\r\npublic struct Carril {\r\n    let id: Int\r\n    let nombre: String\r\n    let descripcion: String?\r\n    let ubicacion: Ubicacion?\r\n    let tarifa: Double?\r\n    let tipo: String?\r\n}\r\n\r\nextension Carril: Argo.Decodable {\r\n    public static func decode(_ j: JSON) -> Argo.Decoded<Carril> {\r\n        let f = curry(Carril.init)\r\n        return f\r\n            <^> j <| \"id\"\r\n            <*> j <| \"nombre\"\r\n            <*> j <|? \"descripcion\"\r\n            <*> j <|? \"ubicacion\"\r\n            <*> j <|? \"costoAuto\" <|> pure(0)\r\n            <*> j <|? \"tipo\"\r\n    }\r\n}\r\n```\r\n\r\n### Argo Version\r\n\r\n_Argo 4.1.2_\r\n\r\n### Dependency Manager\r\n\r\n_Cocoapods_\r\n"},"comment":{"url":"https://api.github.com/repos/thoughtbot/Argo/issues/comments/407443127","html_url":"https://github.com/thoughtbot/Argo/issues/492#issuecomment-407443127","issue_url":"https://api.github.com/repos/thoughtbot/Argo/issues/492","id":407443127,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzQ0MzEyNw==","user":{"login":"gfontenot","id":124499,"node_id":"MDQ6VXNlcjEyNDQ5OQ==","avatar_url":"https://avatars3.githubusercontent.com/u/124499?v=4","gravatar_id":"","url":"https://api.github.com/users/gfontenot","html_url":"https://github.com/gfontenot","followers_url":"https://api.github.com/users/gfontenot/followers","following_url":"https://api.github.com/users/gfontenot/following{/other_user}","gists_url":"https://api.github.com/users/gfontenot/gists{/gist_id}","starred_url":"https://api.github.com/users/gfontenot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gfontenot/subscriptions","organizations_url":"https://api.github.com/users/gfontenot/orgs","repos_url":"https://api.github.com/users/gfontenot/repos","events_url":"https://api.github.com/users/gfontenot/events{/privacy}","received_events_url":"https://api.github.com/users/gfontenot/received_events","type":"User","site_admin":false},"created_at":"2018-07-24T15:13:22Z","updated_at":"2018-07-24T15:13:22Z","author_association":"COLLABORATOR","body":"Hey, sorry for the delay on this. Is this still an issue for you? My assumption would be precedence levels requiring some parens but I'm not sure why that would have changed with a new version of Swift."}}
{"actor":{"display_login":"gfontenot"}}