{"action":"created","issue":{"url":"https://api.github.com/repos/thoughtbot/Argo/issues/235","labels_url":"https://api.github.com/repos/thoughtbot/Argo/issues/235/labels{/name}","comments_url":"https://api.github.com/repos/thoughtbot/Argo/issues/235/comments","events_url":"https://api.github.com/repos/thoughtbot/Argo/issues/235/events","html_url":"https://github.com/thoughtbot/Argo/issues/235","id":107609079,"number":235,"title":"Argo 2, large objects, and ambiguous references.","user":{"login":"nomothetis","id":24384,"avatar_url":"https://avatars.githubusercontent.com/u/24384?v=3","gravatar_id":"","url":"https://api.github.com/users/nomothetis","html_url":"https://github.com/nomothetis","followers_url":"https://api.github.com/users/nomothetis/followers","following_url":"https://api.github.com/users/nomothetis/following{/other_user}","gists_url":"https://api.github.com/users/nomothetis/gists{/gist_id}","starred_url":"https://api.github.com/users/nomothetis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nomothetis/subscriptions","organizations_url":"https://api.github.com/users/nomothetis/orgs","repos_url":"https://api.github.com/users/nomothetis/repos","events_url":"https://api.github.com/users/nomothetis/events{/privacy}","received_events_url":"https://api.github.com/users/nomothetis/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":31,"created_at":"2015-09-21T22:11:59Z","updated_at":"2015-09-30T06:22:12Z","closed_at":"2015-09-23T21:57:44Z","body":"An old problem seems to have resurfaced with a new head. We are breaking up large (more than 11 elements) objects into intermediate parts in order to appease the compiler. However, with the migration to Argo 2.0 and Swift 2, the compiler has a new complaint. Take this case (names made neutral):\r\n\r\n```swift\r\npublic static func decode(j: JSON) -> Decoded<DataObject> {\r\n    let firstPart =  DataObject.create\r\n        <^> j <| \"data1\"\r\n        <*> j <| \"data2\"\r\n        <*> j <| \"data3\"\r\n        <*> j <|? \"data4\"\r\n        <*> j <|? \"data5\"\r\n        \r\n    let secondPart = firstPart\r\n        <*> j <|? \"data6\"\r\n        <*> j <|? \"data7\"\r\n        <*> j <|? \"data8\"\r\n        <*> j <|? \"data9\"\r\n        <*> j <|? \"data10\"\r\n        \r\n    let thirdPart = secondPart\r\n        <*> j <|? \"data11\"\r\n        <*> j <|? \"data12\"\r\n        <*> j <|? \"data13\"\r\n        <*> j <|? \"data14\"\r\n        <*> j <|? \"data15\"\r\n            \r\n    let fourthPart = thirdPart\r\n        <*> j <|? \"data16\"\r\n        <*> j <|? \"data17\"\r\n        <*> j <|? \"data18\"\r\n        <*> j <|? \"data19\"\r\n        <*> j <|? \"data20\"\r\n            \r\n    return fourthPart\r\n        <*> j <|? \"data21\"\r\n        <*> j <|? \"data22\"\r\n        <*> j <|? \"data23\"\r\n        <*> j <|| \"data24\"\r\n        <*> j <|| \"data25\"\r\n        <*> j <|| \"data26\"\r\n        <*> j <|? \"data27\"\r\n}\r\n```\r\n\r\nThe compiler complains in two spots (the second line of the `secondPart` assignment and the second line of the `thirdPart` assignment) about an \"Ambiguous reference to member `<|?`\". Does anyone know a way to get around this that doesn't involve breaking up the DataObject itself into multiple smaller objects that then get merged?"},"comment":{"url":"https://api.github.com/repos/thoughtbot/Argo/issues/comments/144293805","html_url":"https://github.com/thoughtbot/Argo/issues/235#issuecomment-144293805","issue_url":"https://api.github.com/repos/thoughtbot/Argo/issues/235","id":144293805,"user":{"login":"marcel","id":245,"avatar_url":"https://avatars.githubusercontent.com/u/245?v=3","gravatar_id":"","url":"https://api.github.com/users/marcel","html_url":"https://github.com/marcel","followers_url":"https://api.github.com/users/marcel/followers","following_url":"https://api.github.com/users/marcel/following{/other_user}","gists_url":"https://api.github.com/users/marcel/gists{/gist_id}","starred_url":"https://api.github.com/users/marcel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcel/subscriptions","organizations_url":"https://api.github.com/users/marcel/orgs","repos_url":"https://api.github.com/users/marcel/repos","events_url":"https://api.github.com/users/marcel/events{/privacy}","received_events_url":"https://api.github.com/users/marcel/received_events","type":"User","site_admin":false},"created_at":"2015-09-30T06:22:12Z","updated_at":"2015-09-30T06:22:12Z","body":"My observation is that if the struct has *more* than 15 properties all of a sudden the 16th property triggers the Ambiguous reference error. It's not the issue of the expression being too complex. You can split it all out into individual assignments. I verified in two separate unrelated structs that going from 15 to 16 triggered the error.\r\n\r\nIn Scala there is a limitation to the number of arguments a case class constructor can have (23). I don't know if there is some such limit at play here. Googling for swift and 15/16 didn't reveal anything. Figured I'd mention it."}}