{"action":"opened","issue":{"url":"https://api.github.com/repos/realm/realm-cocoa/issues/4442","repository_url":"https://api.github.com/repos/realm/realm-cocoa","labels_url":"https://api.github.com/repos/realm/realm-cocoa/issues/4442/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-cocoa/issues/4442/comments","events_url":"https://api.github.com/repos/realm/realm-cocoa/issues/4442/events","html_url":"https://github.com/realm/realm-cocoa/issues/4442","id":195498800,"number":4442,"title":"Compile error when using append in a Realm List (Swift 3)","user":{"login":"D-32","id":3063279,"avatar_url":"https://avatars.githubusercontent.com/u/3063279?v=3","gravatar_id":"","url":"https://api.github.com/users/D-32","html_url":"https://github.com/D-32","followers_url":"https://api.github.com/users/D-32/followers","following_url":"https://api.github.com/users/D-32/following{/other_user}","gists_url":"https://api.github.com/users/D-32/gists{/gist_id}","starred_url":"https://api.github.com/users/D-32/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/D-32/subscriptions","organizations_url":"https://api.github.com/users/D-32/orgs","repos_url":"https://api.github.com/users/D-32/repos","events_url":"https://api.github.com/users/D-32/events{/privacy}","received_events_url":"https://api.github.com/users/D-32/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-14T10:50:52Z","updated_at":"2016-12-14T10:50:52Z","closed_at":null,"body":"## Goals\r\n\r\nI want to be able to add multiple objects to a Realm List.\r\n\r\n## Expected Results\r\n\r\nCode compiles without errors.\r\n\r\n## Actual Results\r\n\r\nUnable to compile both variants of the code.\r\n`project.messages.append(contentsOf: foundMessages)` gives me following error: `Extraneous argument label 'contentOf:' in call`\r\nBut when I remove the extraneous argument I get following error:\r\n`project.messages.append(foundMessages)`, `Cannot convert value of type '[Message]' to expected argument type 'Message'`\r\n\r\n## Code Sample\r\n\r\n```\r\nimport Foundation\r\nimport RealmSwift\r\n\r\nclass Demo {\r\n  func test() {\r\n    let house1 = House()\r\n    let house2 = House()\r\n    let village = Village()\r\n    village.houses.append(contentsOf: [house1, house2])\r\n    //village.houses.append([house1, house2])\r\n    // both variants cause a compiler error\r\n  }\r\n}\r\n\r\nclass House: Object {\r\n}\r\n\r\nclass Village: Object {\r\n  let houses = List<House>()\r\n}\r\n```\r\n\r\n## Version of Realm and Tooling\r\n\r\nProductName:\tMac OS X\r\nProductVersion:\t10.11.6\r\nBuildVersion:\t15G31\r\n\r\n/Applications/Xcode.app/Contents/Developer\r\nXcode 8.2\r\nBuild version 8C38\r\n\r\n/usr/local/bin/pod\r\n1.1.1\r\nRealm (2.1.1)\r\nRealmSwift (2.1.1)\r\nRealmSwift (~> 2.1)\r\n\r\n/bin/bash\r\nGNU bash, version 3.2.57(1)-release (x86_64-apple-darwin15)\r\n\r\n/usr/local/bin/carthage\r\n0.17.2\r\n(not in use here)\r\n\r\n/usr/bin/git\r\ngit version 2.10.1 (Apple Git-78)"}}
{"actor":{"display_login":"D-32"}}