{"action":"closed","issue":{"url":"https://api.github.com/repos/lampepfl/dotty/issues/355","labels_url":"https://api.github.com/repos/lampepfl/dotty/issues/355/labels{/name}","comments_url":"https://api.github.com/repos/lampepfl/dotty/issues/355/comments","events_url":"https://api.github.com/repos/lampepfl/dotty/issues/355/events","html_url":"https://github.com/lampepfl/dotty/issues/355","id":57176807,"number":355,"title":"Erasure doesn't insert all box\\unbox corsions for ifs","user":{"login":"DarkDimius","id":1084930,"avatar_url":"https://avatars.githubusercontent.com/u/1084930?v=3","gravatar_id":"","url":"https://api.github.com/users/DarkDimius","html_url":"https://github.com/DarkDimius","followers_url":"https://api.github.com/users/DarkDimius/followers","following_url":"https://api.github.com/users/DarkDimius/following{/other_user}","gists_url":"https://api.github.com/users/DarkDimius/gists{/gist_id}","starred_url":"https://api.github.com/users/DarkDimius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DarkDimius/subscriptions","organizations_url":"https://api.github.com/users/DarkDimius/orgs","repos_url":"https://api.github.com/users/DarkDimius/repos","events_url":"https://api.github.com/users/DarkDimius/events{/privacy}","received_events_url":"https://api.github.com/users/DarkDimius/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lampepfl/dotty/labels/Fix%20available","name":"Fix available","color":"5319e7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-10T13:51:53Z","updated_at":"2015-02-13T13:31:58Z","closed_at":"2015-02-13T13:31:58Z","body":"``` \r\n    def id[T](t: T) = t\r\n    { if (x) id(one) else 0} + 1\r\n    { if (x) new scala.util.Random()}.asInstanceOf[Runnable]\r\n```\r\nAfter erasure both those if's have different types of branches:\r\n``` \r\n    { if (x) id(box(one)) else 0} + 1\r\n    { if (x) new scala.util.Random() else ()}.asInstanceOf[Runnable]\r\n```\r\nIn first example `id` should get unboxed,\r\nIn the second example `()` should get boxed."}}