GitHub PullRequestReviewCommentEvent at 2014-10-01 05:29:24
Repository: scala
Actor: retronym
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/scala/scala/pulls/comments/18261943","id":18261943,"diff_hunk":"@@ -142,17 +142,30 @@ trait Unapplies extends ast.TreeDSL {\n   /** The unapply method corresponding to a case class\n    */\n   def caseModuleUnapplyMeth(cdef: ClassDef): DefDef = {\n-    val tparams   = constrTparamsInvariant(cdef)\n-    val method    = constrParamss(cdef) match {\n+    val tparams    = constrTparamsInvariant(cdef)\n+    val method     = constrParamss(cdef) match {\n       case xs :: _ if xs.nonEmpty && isRepeatedParamType(xs.last.tpt) => nme.unapplySeq\n       case _                                                          => nme.unapply\n     }\n-    val cparams   = List(ValDef(Modifiers(PARAM | SYNTHETIC), unapplyParamName, classType(cdef, tparams), EmptyTree))\n-    val ifNull    = if (constrParamss(cdef).head.isEmpty) FALSE else REF(NoneModule)\n-    val body      = nullSafe({ case Ident(x) => caseClassUnapplyReturnValue(x, cdef) }, ifNull)(Ident(unapplyParamName))\n+    val cparams    = List(ValDef(Modifiers(PARAM | SYNTHETIC), unapplyParamName, classType(cdef, tparams), EmptyTree))\n+    val resultType = {\n+      def repeatedToSeq(tp: Tree) = tp match {\n+        case AppliedTypeTree(Select(_, tpnme.REPEATED_PARAM_CLASS_NAME), tps) => AppliedTypeTree(gen.rootScalaDot(tpnme.Seq), tps)\n+        case _                                                                => tp\n+      }\n+      constrParamss(cdef) match {\n+        case Nil | Nil :: _ =>\n+          gen.rootScalaDot(tpnme.Boolean)\n+        case params :: _ =>\n+          val constrParamTypes = params.map(param => repeatedToSeq(param.tpt))\n+          AppliedTypeTree(gen.rootScalaDot(tpnme.Option), List(treeBuilder.makeTupleType(constrParamTypes)))","path":"src/compiler/scala/tools/nsc/typechecker/Unapplies.scala","position":25,"original_position":25,"commit_id":"559b25105550228599b85d98fd64a72cfd91851a","original_commit_id":"559b25105550228599b85d98fd64a72cfd91851a","user":{"login":"retronym","id":65551,"avatar_url":"https://avatars.githubusercontent.com/u/65551?v=2","gravatar_id":"","url":"https://api.github.com/users/retronym","html_url":"https://github.com/retronym","followers_url":"https://api.github.com/users/retronym/followers","following_url":"https://api.github.com/users/retronym/following{/other_user}","gists_url":"https://api.github.com/users/retronym/gists{/gist_id}","starred_url":"https://api.github.com/users/retronym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/retronym/subscriptions","organizations_url":"https://api.github.com/users/retronym/orgs","repos_url":"https://api.github.com/users/retronym/repos","events_url":"https://api.github.com/users/retronym/events{/privacy}","received_events_url":"https://api.github.com/users/retronym/received_events","type":"User","site_admin":false},"body":"This ain't hygenic.\r\n\r\n```scala\r\n\r\ncase class C2(b: Tuple1[_ <: String])\r\n\r\nobject C2 {\r\n  class String\r\n}\r\n```","created_at":"2014-10-01T05:29:24Z","updated_at":"2014-10-01T05:29:24Z","html_url":"https://github.com/scala/scala/pull/4017#discussion_r18261943","pull_request_url":"https://api.github.com/repos/scala/scala/pulls/4017","_links":{"self":{"href":"https://api.github.com/repos/scala/scala/pulls/comments/18261943"},"html":{"href":"https://github.com/scala/scala/pull/4017#discussion_r18261943"},"pull_request":{"href":"https://api.github.com/repos/scala/scala/pulls/4017"}}},"pull_request":{"url":"https://api.github.com/repos/scala/scala/pulls/4017","id":22002089,"html_url":"https://github.com/scala/scala/pull/4017","diff_url":"https://github.com/scala/scala/pull/4017.diff","patch_url":"https://github.com/scala/scala/pull/4017.patch","issue_url":"https://api.github.com/repos/scala/scala/issues/4017","number":4017,"state":"open","locked":false,"title":"SI-6541 valid wildcard existentials for case-module-unapply","user":{"login":"lrytz","id":119636,"avatar_url":"https://avatars.githubusercontent.com/u/119636?v=2","gravatar_id":"","url":"https://api.github.com/users/lrytz","html_url":"https://github.com/lrytz","followers_url":"https://api.github.com/users/lrytz/followers","following_url":"https://api.github.com/users/lrytz/following{/other_user}","gists_url":"https://api.github.com/users/lrytz/gists{/gist_id}","starred_url":"https://api.github.com/users/lrytz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lrytz/subscriptions","organizations_url":"https://api.github.com/users/lrytz/orgs","repos_url":"https://api.github.com/users/lrytz/repos","events_url":"https://api.github.com/users/lrytz/events{/privacy}","received_events_url":"https://api.github.com/users/lrytz/received_events","type":"User","site_admin":false},"body":"Instead of letting the compiler infer the return type of case module\r\nunapply methods, provide them explicitly.","created_at":"2014-09-30T13:04:31Z","updated_at":"2014-10-01T05:29:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bf99f265504152cd043faa417dca31d94ee6f551","assignee":null,"milestone":{"url":"https://api.github.com/repos/scala/scala/milestones/41","labels_url":"https://api.github.com/repos/scala/scala/milestones/41/labels","id":639718,"number":41,"title":"2.11.3","description":"Merge to 2.11.x.\r\n\r\n(Release Oct 7. PR queue closes Sep 30.)","creator":{"login":"adriaanm","id":91083,"avatar_url":"https://avatars.githubusercontent.com/u/91083?v=2","gravatar_id":"","url":"https://api.github.com/users/adriaanm","html_url":"https://github.com/adriaanm","followers_url":"https://api.github.com/users/adriaanm/followers","following_url":"https://api.github.com/users/adriaanm/following{/other_user}","gists_url":"https://api.github.com/users/adriaanm/gists{/gist_id}","starred_url":"https://api.github.com/users/adriaanm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adriaanm/subscriptions","organizations_url":"https://api.github.com/users/adriaanm/orgs","repos_url":"https://api.github.com/users/adriaanm/repos","events_url":"https://api.github.com/users/adriaanm/events{/privacy}","received_events_url":"https://api.github.com/users/adriaanm/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":89,"state":"open","created_at":"2014-04-24T21:44:19Z","updated_at":"2014-10-01T05:04:23Z","due_on":"2014-09-30T07:00:00Z"},"commits_url":"https://api.github.com/repos/scala/scala/pulls/4017/commits","review_comments_url":"https://api.github.com/repos/scala/scala/pulls/4017/comments","review_comment_url":"https://api.github.com/repos/scala/scala/pulls/comments/{number}","comments_url":"https://api.github.com/repos/scala/scala/issues/4017/comments","statuses_url":"https://api.github.com/repos/scala/scala/statuses/559b25105550228599b85d98fd64a72cfd91851a","head":{"label":"lrytz:t6541","ref":"t6541","sha":"559b25105550228599b85d98fd64a72cfd91851a","user":{"login":"lrytz","id":119636,"avatar_url":"https://avatars.githubusercontent.com/u/119636?v=2","gravatar_id":"","url":"https://api.github.com/users/lrytz","html_url":"https://github.com/lrytz","followers_url":"https://api.github.com/users/lrytz/followers","following_url":"https://api.github.com/users/lrytz/following{/other_user}","gists_url":"https://api.github.com/users/lrytz/gists{/gist_id}","starred_url":"https://api.github.com/users/lrytz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lrytz/subscriptions","organizations_url":"https://api.github.com/users/lrytz/orgs","repos_url":"https://api.github.com/users/lrytz/repos","events_url":"https://api.github.com/users/lrytz/events{/privacy}","received_events_url":"https://api.github.com/users/lrytz/received_events","type":"User","site_admin":false},"repo":{"id":2891199,"name":"scala","full_name":"lrytz/scala","owner":{"login":"lrytz","id":119636,"avatar_url":"https://avatars.githubusercontent.com/u/119636?v=2","gravatar_id":"","url":"https://api.github.com/users/lrytz","html_url":"https://github.com/lrytz","followers_url":"https://api.github.com/users/lrytz/followers","following_url":"https://api.github.com/users/lrytz/following{/other_user}","gists_url":"https://api.github.com/users/lrytz/gists{/gist_id}","starred_url":"https://api.github.com/users/lrytz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lrytz/subscriptions","organizations_url":"https://api.github.com/users/lrytz/orgs","repos_url":"https://api.github.com/users/lrytz/repos","events_url":"https://api.github.com/users/lrytz/events{/privacy}","received_events_url":"https://api.github.com/users/lrytz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lrytz/scala","description":"The Scala programming language","fork":true,"url":"https://api.github.com/repos/lrytz/scala","forks_url":"https://api.github.com/repos/lrytz/scala/forks","keys_url":"https://api.github.com/repos/lrytz/scala/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lrytz/scala/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lrytz/scala/teams","hooks_url":"https://api.github.com/repos/lrytz/scala/hooks","issue_events_url":"https://api.github.com/repos/lrytz/scala/issues/events{/number}","events_url":"https://api.github.com/repos/lrytz/scala/events","assignees_url":"https://api.github.com/repos/lrytz/scala/assignees{/user}","branches_url":"https://api.github.com/repos/lrytz/scala/branches{/branch}","tags_url":"https://api.github.com/repos/lrytz/scala/tags","blobs_url":"https://api.github.com/repos/lrytz/scala/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lrytz/scala/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lrytz/scala/git/refs{/sha}","trees_url":"https://api.github.com/repos/lrytz/scala/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lrytz/scala/statuses/{sha}","languages_url":"https://api.github.com/repos/lrytz/scala/languages","stargazers_url":"https://api.github.com/repos/lrytz/scala/stargazers","contributors_url":"https://api.github.com/repos/lrytz/scala/contributors","subscribers_url":"https://api.github.com/repos/lrytz/scala/subscribers","subscription_url":"https://api.github.com/repos/lrytz/scala/subscription","commits_url":"https://api.github.com/repos/lrytz/scala/commits{/sha}","git_commits_url":"https://api.github.com/repos/lrytz/scala/git/commits{/sha}","comments_url":"https://api.github.com/repos/lrytz/scala/comments{/number}","issue_comment_url":"https://api.github.com/repos/lrytz/scala/issues/comments/{number}","contents_url":"https://api.github.com/repos/lrytz/scala/contents/{+path}","compare_url":"https://api.github.com/repos/lrytz/scala/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lrytz/scala/merges","archive_url":"https://api.github.com/repos/lrytz/scala/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lrytz/scala/downloads","issues_url":"https://api.github.com/repos/lrytz/scala/issues{/number}","pulls_url":"https://api.github.com/repos/lrytz/scala/pulls{/number}","milestones_url":"https://api.github.com/repos/lrytz/scala/milestones{/number}","notifications_url":"https://api.github.com/repos/lrytz/scala/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lrytz/scala/labels{/name}","releases_url":"https://api.github.com/repos/lrytz/scala/releases{/id}","created_at":"2011-12-01T13:16:01Z","updated_at":"2014-09-02T12:59:28Z","pushed_at":"2014-09-30T14:20:56Z","git_url":"git://github.com/lrytz/scala.git","ssh_url":"git@github.com:lrytz/scala.git","clone_url":"https://github.com/lrytz/scala.git","svn_url":"https://github.com/lrytz/scala","homepage":"http://www.scala-lang.org/","size":81519,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"2.11.x"}},"base":{"label":"scala:2.11.x","ref":"2.11.x","sha":"a52db7f1639c6d48eaa64ae609385a60467fd566","user":{"login":"scala","id":57059,"avatar_url":"https://avatars.githubusercontent.com/u/57059?v=2","gravatar_id":"","url":"https://api.github.com/users/scala","html_url":"https://github.com/scala","followers_url":"https://api.github.com/users/scala/followers","following_url":"https://api.github.com/users/scala/following{/other_user}","gists_url":"https://api.github.com/users/scala/gists{/gist_id}","starred_url":"https://api.github.com/users/scala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scala/subscriptions","organizations_url":"https://api.github.com/users/scala/orgs","repos_url":"https://api.github.com/users/scala/repos","events_url":"https://api.github.com/users/scala/events{/privacy}","received_events_url":"https://api.github.com/users/scala/received_events","type":"Organization","site_admin":false},"repo":{"id":2888818,"name":"scala","full_name":"scala/scala","owner":{"login":"scala","id":57059,"avatar_url":"https://avatars.githubusercontent.com/u/57059?v=2","gravatar_id":"","url":"https://api.github.com/users/scala","html_url":"https://github.com/scala","followers_url":"https://api.github.com/users/scala/followers","following_url":"https://api.github.com/users/scala/following{/other_user}","gists_url":"https://api.github.com/users/scala/gists{/gist_id}","starred_url":"https://api.github.com/users/scala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scala/subscriptions","organizations_url":"https://api.github.com/users/scala/orgs","repos_url":"https://api.github.com/users/scala/repos","events_url":"https://api.github.com/users/scala/events{/privacy}","received_events_url":"https://api.github.com/users/scala/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scala/scala","description":"The Scala programming language","fork":false,"url":"https://api.github.com/repos/scala/scala","forks_url":"https://api.github.com/repos/scala/scala/forks","keys_url":"https://api.github.com/repos/scala/scala/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scala/scala/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scala/scala/teams","hooks_url":"https://api.github.com/repos/scala/scala/hooks","issue_events_url":"https://api.github.com/repos/scala/scala/issues/events{/number}","events_url":"https://api.github.com/repos/scala/scala/events","assignees_url":"https://api.github.com/repos/scala/scala/assignees{/user}","branches_url":"https://api.github.com/repos/scala/scala/branches{/branch}","tags_url":"https://api.github.com/repos/scala/scala/tags","blobs_url":"https://api.github.com/repos/scala/scala/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scala/scala/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scala/scala/git/refs{/sha}","trees_url":"https://api.github.com/repos/scala/scala/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scala/scala/statuses/{sha}","languages_url":"https://api.github.com/repos/scala/scala/languages","stargazers_url":"https://api.github.com/repos/scala/scala/stargazers","contributors_url":"https://api.github.com/repos/scala/scala/contributors","subscribers_url":"https://api.github.com/repos/scala/scala/subscribers","subscription_url":"https://api.github.com/repos/scala/scala/subscription","commits_url":"https://api.github.com/repos/scala/scala/commits{/sha}","git_commits_url":"https://api.github.com/repos/scala/scala/git/commits{/sha}","comments_url":"https://api.github.com/repos/scala/scala/comments{/number}","issue_comment_url":"https://api.github.com/repos/scala/scala/issues/comments/{number}","contents_url":"https://api.github.com/repos/scala/scala/contents/{+path}","compare_url":"https://api.github.com/repos/scala/scala/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scala/scala/merges","archive_url":"https://api.github.com/repos/scala/scala/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scala/scala/downloads","issues_url":"https://api.github.com/repos/scala/scala/issues{/number}","pulls_url":"https://api.github.com/repos/scala/scala/pulls{/number}","milestones_url":"https://api.github.com/repos/scala/scala/milestones{/number}","notifications_url":"https://api.github.com/repos/scala/scala/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scala/scala/labels{/name}","releases_url":"https://api.github.com/repos/scala/scala/releases{/id}","created_at":"2011-12-01T05:02:34Z","updated_at":"2014-10-01T02:04:47Z","pushed_at":"2014-09-30T14:38:49Z","git_url":"git://github.com/scala/scala.git","ssh_url":"git@github.com:scala/scala.git","clone_url":"https://github.com/scala/scala.git","svn_url":"https://github.com/scala/scala","homepage":"http://www.scala-lang.org/","size":183704,"stargazers_count":2991,"watchers_count":2991,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":828,"mirror_url":null,"open_issues_count":26,"forks":828,"open_issues":26,"watchers":2991,"default_branch":"2.11.x"}},"_links":{"self":{"href":"https://api.github.com/repos/scala/scala/pulls/4017"},"html":{"href":"https://github.com/scala/scala/pull/4017"},"issue":{"href":"https://api.github.com/repos/scala/scala/issues/4017"},"comments":{"href":"https://api.github.com/repos/scala/scala/issues/4017/comments"},"review_comments":{"href":"https://api.github.com/repos/scala/scala/pulls/4017/comments"},"review_comment":{"href":"https://api.github.com/repos/scala/scala/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/scala/scala/pulls/4017/commits"},"statuses":{"href":"https://api.github.com/repos/scala/scala/statuses/559b25105550228599b85d98fd64a72cfd91851a"}}}}