{"action":"created","issue":{"url":"https://api.github.com/repos/scala/scala-collection-compat/issues/153","repository_url":"https://api.github.com/repos/scala/scala-collection-compat","labels_url":"https://api.github.com/repos/scala/scala-collection-compat/issues/153/labels{/name}","comments_url":"https://api.github.com/repos/scala/scala-collection-compat/issues/153/comments","events_url":"https://api.github.com/repos/scala/scala-collection-compat/issues/153/events","html_url":"https://github.com/scala/scala-collection-compat/issues/153","id":361214106,"node_id":"MDU6SXNzdWUzNjEyMTQxMDY=","number":153,"title":".toMap does not force the evaluation of MapView","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":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-18T09:26:45Z","updated_at":"2018-09-23T05:46:27Z","closed_at":null,"author_association":"MEMBER","body":"In the experimental rule we use:\r\n\r\n```scala\r\n- map.mapValues(x => x)\r\n+ map.mapValues(x => x).toMap\r\n```\r\n\r\nto force the evaluation of the `MapView`. This is incorrect:\r\n\r\n```scala\r\nval m = Map(1 -> 1, 2 -> 2).mapValues{x => println(x); x }.toMap\r\n1\r\n2\r\n> m\r\n1\r\n2\r\nres1: scala.collection.immutable.Map[Int,Int] = Map(1 -> 1, 2 -> 2)\r\n```\r\n\r\nvs\r\n```scala\r\nval m = Map(1 -> 1, 2 -> 2).mapValues{x => println(x); x }.toList.toMap\r\n1\r\n2\r\n> m\r\nres1: scala.collection.immutable.Map[Int,Int] = Map(1 -> 1, 2 -> 2)\r\n```"},"comment":{"url":"https://api.github.com/repos/scala/scala-collection-compat/issues/comments/423793623","html_url":"https://github.com/scala/scala-collection-compat/issues/153#issuecomment-423793623","issue_url":"https://api.github.com/repos/scala/scala-collection-compat/issues/153","id":423793623,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzc5MzYyMw==","user":{"login":"NthPortal","id":7505383,"node_id":"MDQ6VXNlcjc1MDUzODM=","avatar_url":"https://avatars0.githubusercontent.com/u/7505383?v=4","gravatar_id":"","url":"https://api.github.com/users/NthPortal","html_url":"https://github.com/NthPortal","followers_url":"https://api.github.com/users/NthPortal/followers","following_url":"https://api.github.com/users/NthPortal/following{/other_user}","gists_url":"https://api.github.com/users/NthPortal/gists{/gist_id}","starred_url":"https://api.github.com/users/NthPortal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NthPortal/subscriptions","organizations_url":"https://api.github.com/users/NthPortal/orgs","repos_url":"https://api.github.com/users/NthPortal/repos","events_url":"https://api.github.com/users/NthPortal/events{/privacy}","received_events_url":"https://api.github.com/users/NthPortal/received_events","type":"User","site_admin":false},"created_at":"2018-09-23T05:46:27Z","updated_at":"2018-09-23T05:46:27Z","author_association":"NONE","body":"tentatively assigning this to the RC1 milestone, as it seems sufficiently important to address by then"}}
{"actor":{"display_login":"NthPortal"}}