{"action":"created","issue":{"url":"https://api.github.com/repos/lampepfl/dotty/issues/1317","repository_url":"https://api.github.com/repos/lampepfl/dotty","labels_url":"https://api.github.com/repos/lampepfl/dotty/issues/1317/labels{/name}","comments_url":"https://api.github.com/repos/lampepfl/dotty/issues/1317/comments","events_url":"https://api.github.com/repos/lampepfl/dotty/issues/1317/events","html_url":"https://github.com/lampepfl/dotty/issues/1317","id":159774598,"number":1317,"title":"Specification for synthesized unapply changed in dotty?","user":{"login":"liufengyun","id":754633,"avatar_url":"https://avatars.githubusercontent.com/u/754633?v=3","gravatar_id":"","url":"https://api.github.com/users/liufengyun","html_url":"https://github.com/liufengyun","followers_url":"https://api.github.com/users/liufengyun/followers","following_url":"https://api.github.com/users/liufengyun/following{/other_user}","gists_url":"https://api.github.com/users/liufengyun/gists{/gist_id}","starred_url":"https://api.github.com/users/liufengyun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liufengyun/subscriptions","organizations_url":"https://api.github.com/users/liufengyun/orgs","repos_url":"https://api.github.com/users/liufengyun/repos","events_url":"https://api.github.com/users/liufengyun/events{/privacy}","received_events_url":"https://api.github.com/users/liufengyun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-11T13:55:41Z","updated_at":"2016-06-11T14:01:23Z","closed_at":null,"body":"With following code:\r\n```Scala\r\ncase class A(i: Int)\r\n```\r\nThe synthesized `unapply` is as follows:\r\n``` Scala\r\ndef unapply(x$1: A): A = x$1\r\n```\r\nAccording to the scala specification, the return type should be `Option[Int]`, and scalac does that:\r\n```Scala\r\ncase <synthetic> def unapply(x$0: A): Option[Int] = if (x$0.==(null))\r\n      scala.this.None\r\n    else\r\n      Some.apply[Int](x$0.i);\r\n```"},"comment":{"url":"https://api.github.com/repos/lampepfl/dotty/issues/comments/225363813","html_url":"https://github.com/lampepfl/dotty/issues/1317#issuecomment-225363813","issue_url":"https://api.github.com/repos/lampepfl/dotty/issues/1317","id":225363813,"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},"created_at":"2016-06-11T14:01:23Z","updated_at":"2016-06-11T14:01:23Z","body":"The biggest difference is that instead of using `isEmpty` dotty uses `isDefined`. I'm not aware why."}}
{"actor":{"display_login":"DarkDimius"}}