{"action":"closed","issue":{"url":"https://api.github.com/repos/scala/scala-collection-compat/issues/101","repository_url":"https://api.github.com/repos/scala/scala-collection-compat","labels_url":"https://api.github.com/repos/scala/scala-collection-compat/issues/101/labels{/name}","comments_url":"https://api.github.com/repos/scala/scala-collection-compat/issues/101/comments","events_url":"https://api.github.com/repos/scala/scala-collection-compat/issues/101/events","html_url":"https://github.com/scala/scala-collection-compat/issues/101","id":342318698,"node_id":"MDU6SXNzdWUzNDIzMTg2OTg=","number":101,"title":"Rewrite rule .to[X] => .to(X) is not cross-compatible for Map","user":{"login":"MasseGuillaume","id":921490,"node_id":"MDQ6VXNlcjkyMTQ5MA==","avatar_url":"https://avatars2.githubusercontent.com/u/921490?v=4","gravatar_id":"","url":"https://api.github.com/users/MasseGuillaume","html_url":"https://github.com/MasseGuillaume","followers_url":"https://api.github.com/users/MasseGuillaume/followers","following_url":"https://api.github.com/users/MasseGuillaume/following{/other_user}","gists_url":"https://api.github.com/users/MasseGuillaume/gists{/gist_id}","starred_url":"https://api.github.com/users/MasseGuillaume/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MasseGuillaume/subscriptions","organizations_url":"https://api.github.com/users/MasseGuillaume/orgs","repos_url":"https://api.github.com/users/MasseGuillaume/repos","events_url":"https://api.github.com/users/MasseGuillaume/events{/privacy}","received_events_url":"https://api.github.com/users/MasseGuillaume/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/scala/scala-collection-compat/milestones/3","html_url":"https://github.com/scala/scala-collection-compat/milestone/3","labels_url":"https://api.github.com/repos/scala/scala-collection-compat/milestones/3/labels","id":3462896,"node_id":"MDk6TWlsZXN0b25lMzQ2Mjg5Ng==","number":3,"title":"2.13.0-M5","description":"","creator":{"login":"julienrf","id":332812,"node_id":"MDQ6VXNlcjMzMjgxMg==","avatar_url":"https://avatars2.githubusercontent.com/u/332812?v=4","gravatar_id":"","url":"https://api.github.com/users/julienrf","html_url":"https://github.com/julienrf","followers_url":"https://api.github.com/users/julienrf/followers","following_url":"https://api.github.com/users/julienrf/following{/other_user}","gists_url":"https://api.github.com/users/julienrf/gists{/gist_id}","starred_url":"https://api.github.com/users/julienrf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julienrf/subscriptions","organizations_url":"https://api.github.com/users/julienrf/orgs","repos_url":"https://api.github.com/users/julienrf/repos","events_url":"https://api.github.com/users/julienrf/events{/privacy}","received_events_url":"https://api.github.com/users/julienrf/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":3,"state":"open","created_at":"2018-06-29T15:47:10Z","updated_at":"2018-07-25T09:20:22Z","due_on":"2018-07-31T07:00:00Z","closed_at":null},"comments":2,"created_at":"2018-07-18T13:02:25Z","updated_at":"2018-07-25T09:20:22Z","closed_at":"2018-07-25T09:20:22Z","author_association":"CONTRIBUTOR","body":"Currently, the rewrite will do the following patch\r\n\r\n```diff\r\n-List((1, 2)).to[Map]: Map[Int, Int]\r\n+List((1, 2)).to(Map): Map[Int, Int]\r\n```\r\n\r\nThis gives a type error since the `to` function returns an `Iterable[(Int, Int)]`.\r\n\r\nThe signature of .to[X] is \r\n\r\n```scala\r\ndef to[Col[_]](implicit cbf: CanBuildFrom[Nothing, A, Col[A @uV]]): Col[A @uV]\r\n```\r\n\r\nhttps://github.com/scala/scala/blob/90c94cc2ead0b7b1d9ba170da08d27504b2f0fa8/src/library/scala/collection/GenTraversableOnce.scala#L668\r\n\r\nBecause of the `Col[A]` it's not possible to use to in order to create a `Map[Int, Int]`. We should guard for similar types: `BitSet`, `SortedMap`, etc and convert to the expected type.\r\n\r\n```diff\r\n-List((1, 2)).to[Map]: Map[Int, Int]\r\n+List((1, 2)).to(Map).toMap: Map[Int, Int]\r\n```"}}
{"actor":{"display_login":"MasseGuillaume"}}