{"action":"created","comment":{"url":"https://api.github.com/repos/lampepfl/dotty/pulls/comments/119447864","pull_request_review_id":41328606,"id":119447864,"diff_hunk":"@@ -0,0 +1,46 @@\n+package dotty.tools.dotc.transform\n+\n+import dotty.tools.dotc.ast.tpd._\n+import dotty.tools.dotc.core.Contexts.Context\n+import dotty.tools.dotc.core.Flags._\n+import dotty.tools.dotc.core.Types.{Type, TypeRef}\n+import dotty.tools.dotc.transform.TreeTransforms.{MiniPhaseTransform, TransformerInfo}\n+\n+/**\n+  * Eliminates syntactic references to Java packages, so that there's no chance\n+  * they accidentally end up in the backend.\n+  */\n+class ElimJavaPackages extends MiniPhaseTransform {\n+\n+  override def phaseName: String = \"elimJavaPackages\"\n+\n+  override def transformSelect(tree: Select)(implicit ctx: Context, info: TransformerInfo): Tree = {\n+    if (isJavaPackage(tree)) {\n+      assert(tree.tpe.isInstanceOf[TypeRef], s\"Expected tree with type TypeRef, but got ${tree.tpe.show}\")\n+      Ident(tree.tpe.asInstanceOf[TypeRef])\n+    } else {\n+      tree\n+    }\n+  }\n+\n+  override def checkPostCondition(tree: Tree)(implicit ctx: Context): Unit = {","path":"compiler/src/dotty/tools/dotc/transform/ElimJavaPackages.scala","position":26,"original_position":26,"commit_id":"b911233de6f9f12545b6c03cd579d3b31b52aa14","original_commit_id":"b911233de6f9f12545b6c03cd579d3b31b52aa14","user":{"login":"abeln","id":1782179,"avatar_url":"https://avatars1.githubusercontent.com/u/1782179?v=3","gravatar_id":"","url":"https://api.github.com/users/abeln","html_url":"https://github.com/abeln","followers_url":"https://api.github.com/users/abeln/followers","following_url":"https://api.github.com/users/abeln/following{/other_user}","gists_url":"https://api.github.com/users/abeln/gists{/gist_id}","starred_url":"https://api.github.com/users/abeln/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abeln/subscriptions","organizations_url":"https://api.github.com/users/abeln/orgs","repos_url":"https://api.github.com/users/abeln/repos","events_url":"https://api.github.com/users/abeln/events{/privacy}","received_events_url":"https://api.github.com/users/abeln/received_events","type":"User","site_admin":false},"body":"@DarkDimius I added the postcondition, but is there a way to run all the tests with -Ycheck enabled? (Is that done by default in the CI?)","created_at":"2017-05-31T19:13:10Z","updated_at":"2017-05-31T19:13:15Z","html_url":"https://github.com/lampepfl/dotty/pull/2528#discussion_r119447864","pull_request_url":"https://api.github.com/repos/lampepfl/dotty/pulls/2528","_links":{"self":{"href":"https://api.github.com/repos/lampepfl/dotty/pulls/comments/119447864"},"html":{"href":"https://github.com/lampepfl/dotty/pull/2528#discussion_r119447864"},"pull_request":{"href":"https://api.github.com/repos/lampepfl/dotty/pulls/2528"}}},"pull_request":{"url":"https://api.github.com/repos/lampepfl/dotty/pulls/2528","id":122314511,"html_url":"https://github.com/lampepfl/dotty/pull/2528","diff_url":"https://github.com/lampepfl/dotty/pull/2528.diff","patch_url":"https://github.com/lampepfl/dotty/pull/2528.patch","issue_url":"https://api.github.com/repos/lampepfl/dotty/issues/2528","number":2528,"state":"open","locked":false,"title":"[WIP] Fix #2456: eliminate syntactic references to Java packages","user":{"login":"abeln","id":1782179,"avatar_url":"https://avatars1.githubusercontent.com/u/1782179?v=3","gravatar_id":"","url":"https://api.github.com/users/abeln","html_url":"https://github.com/abeln","followers_url":"https://api.github.com/users/abeln/followers","following_url":"https://api.github.com/users/abeln/following{/other_user}","gists_url":"https://api.github.com/users/abeln/gists{/gist_id}","starred_url":"https://api.github.com/users/abeln/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abeln/subscriptions","organizations_url":"https://api.github.com/users/abeln/orgs","repos_url":"https://api.github.com/users/abeln/repos","events_url":"https://api.github.com/users/abeln/events{/privacy}","received_events_url":"https://api.github.com/users/abeln/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-05-24T20:18:09Z","updated_at":"2017-05-31T19:13:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0dcc54a0fcf88100e13713220bef7ba27c8ee8aa","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/lampepfl/dotty/pulls/2528/commits","review_comments_url":"https://api.github.com/repos/lampepfl/dotty/pulls/2528/comments","review_comment_url":"https://api.github.com/repos/lampepfl/dotty/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lampepfl/dotty/issues/2528/comments","statuses_url":"https://api.github.com/repos/lampepfl/dotty/statuses/b911233de6f9f12545b6c03cd579d3b31b52aa14","head":{"label":"abeln:java-packages","ref":"java-packages","sha":"b911233de6f9f12545b6c03cd579d3b31b52aa14","user":{"login":"abeln","id":1782179,"avatar_url":"https://avatars1.githubusercontent.com/u/1782179?v=3","gravatar_id":"","url":"https://api.github.com/users/abeln","html_url":"https://github.com/abeln","followers_url":"https://api.github.com/users/abeln/followers","following_url":"https://api.github.com/users/abeln/following{/other_user}","gists_url":"https://api.github.com/users/abeln/gists{/gist_id}","starred_url":"https://api.github.com/users/abeln/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abeln/subscriptions","organizations_url":"https://api.github.com/users/abeln/orgs","repos_url":"https://api.github.com/users/abeln/repos","events_url":"https://api.github.com/users/abeln/events{/privacy}","received_events_url":"https://api.github.com/users/abeln/received_events","type":"User","site_admin":false},"repo":{"id":85237132,"name":"dotty","full_name":"abeln/dotty","owner":{"login":"abeln","id":1782179,"avatar_url":"https://avatars1.githubusercontent.com/u/1782179?v=3","gravatar_id":"","url":"https://api.github.com/users/abeln","html_url":"https://github.com/abeln","followers_url":"https://api.github.com/users/abeln/followers","following_url":"https://api.github.com/users/abeln/following{/other_user}","gists_url":"https://api.github.com/users/abeln/gists{/gist_id}","starred_url":"https://api.github.com/users/abeln/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abeln/subscriptions","organizations_url":"https://api.github.com/users/abeln/orgs","repos_url":"https://api.github.com/users/abeln/repos","events_url":"https://api.github.com/users/abeln/events{/privacy}","received_events_url":"https://api.github.com/users/abeln/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abeln/dotty","description":"Research platform for new language concepts and compiler technologies for Scala.","fork":true,"url":"https://api.github.com/repos/abeln/dotty","forks_url":"https://api.github.com/repos/abeln/dotty/forks","keys_url":"https://api.github.com/repos/abeln/dotty/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abeln/dotty/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abeln/dotty/teams","hooks_url":"https://api.github.com/repos/abeln/dotty/hooks","issue_events_url":"https://api.github.com/repos/abeln/dotty/issues/events{/number}","events_url":"https://api.github.com/repos/abeln/dotty/events","assignees_url":"https://api.github.com/repos/abeln/dotty/assignees{/user}","branches_url":"https://api.github.com/repos/abeln/dotty/branches{/branch}","tags_url":"https://api.github.com/repos/abeln/dotty/tags","blobs_url":"https://api.github.com/repos/abeln/dotty/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abeln/dotty/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abeln/dotty/git/refs{/sha}","trees_url":"https://api.github.com/repos/abeln/dotty/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abeln/dotty/statuses/{sha}","languages_url":"https://api.github.com/repos/abeln/dotty/languages","stargazers_url":"https://api.github.com/repos/abeln/dotty/stargazers","contributors_url":"https://api.github.com/repos/abeln/dotty/contributors","subscribers_url":"https://api.github.com/repos/abeln/dotty/subscribers","subscription_url":"https://api.github.com/repos/abeln/dotty/subscription","commits_url":"https://api.github.com/repos/abeln/dotty/commits{/sha}","git_commits_url":"https://api.github.com/repos/abeln/dotty/git/commits{/sha}","comments_url":"https://api.github.com/repos/abeln/dotty/comments{/number}","issue_comment_url":"https://api.github.com/repos/abeln/dotty/issues/comments{/number}","contents_url":"https://api.github.com/repos/abeln/dotty/contents/{+path}","compare_url":"https://api.github.com/repos/abeln/dotty/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abeln/dotty/merges","archive_url":"https://api.github.com/repos/abeln/dotty/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abeln/dotty/downloads","issues_url":"https://api.github.com/repos/abeln/dotty/issues{/number}","pulls_url":"https://api.github.com/repos/abeln/dotty/pulls{/number}","milestones_url":"https://api.github.com/repos/abeln/dotty/milestones{/number}","notifications_url":"https://api.github.com/repos/abeln/dotty/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abeln/dotty/labels{/name}","releases_url":"https://api.github.com/repos/abeln/dotty/releases{/id}","deployments_url":"https://api.github.com/repos/abeln/dotty/deployments","created_at":"2017-03-16T20:08:05Z","updated_at":"2017-03-16T20:08:13Z","pushed_at":"2017-05-31T19:11:20Z","git_url":"git://github.com/abeln/dotty.git","ssh_url":"git@github.com:abeln/dotty.git","clone_url":"https://github.com/abeln/dotty.git","svn_url":"https://github.com/abeln/dotty","homepage":"http://dotty.epfl.ch","size":33367,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_projects":true,"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":"master"}},"base":{"label":"lampepfl:master","ref":"master","sha":"5d9e31b192605212b32efe7ebc0c164b27fe8a1e","user":{"login":"lampepfl","id":2684793,"avatar_url":"https://avatars2.githubusercontent.com/u/2684793?v=3","gravatar_id":"","url":"https://api.github.com/users/lampepfl","html_url":"https://github.com/lampepfl","followers_url":"https://api.github.com/users/lampepfl/followers","following_url":"https://api.github.com/users/lampepfl/following{/other_user}","gists_url":"https://api.github.com/users/lampepfl/gists{/gist_id}","starred_url":"https://api.github.com/users/lampepfl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lampepfl/subscriptions","organizations_url":"https://api.github.com/users/lampepfl/orgs","repos_url":"https://api.github.com/users/lampepfl/repos","events_url":"https://api.github.com/users/lampepfl/events{/privacy}","received_events_url":"https://api.github.com/users/lampepfl/received_events","type":"Organization","site_admin":false},"repo":{"id":7035651,"name":"dotty","full_name":"lampepfl/dotty","owner":{"login":"lampepfl","id":2684793,"avatar_url":"https://avatars2.githubusercontent.com/u/2684793?v=3","gravatar_id":"","url":"https://api.github.com/users/lampepfl","html_url":"https://github.com/lampepfl","followers_url":"https://api.github.com/users/lampepfl/followers","following_url":"https://api.github.com/users/lampepfl/following{/other_user}","gists_url":"https://api.github.com/users/lampepfl/gists{/gist_id}","starred_url":"https://api.github.com/users/lampepfl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lampepfl/subscriptions","organizations_url":"https://api.github.com/users/lampepfl/orgs","repos_url":"https://api.github.com/users/lampepfl/repos","events_url":"https://api.github.com/users/lampepfl/events{/privacy}","received_events_url":"https://api.github.com/users/lampepfl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lampepfl/dotty","description":"Research platform for new language concepts and compiler technologies for Scala.","fork":false,"url":"https://api.github.com/repos/lampepfl/dotty","forks_url":"https://api.github.com/repos/lampepfl/dotty/forks","keys_url":"https://api.github.com/repos/lampepfl/dotty/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lampepfl/dotty/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lampepfl/dotty/teams","hooks_url":"https://api.github.com/repos/lampepfl/dotty/hooks","issue_events_url":"https://api.github.com/repos/lampepfl/dotty/issues/events{/number}","events_url":"https://api.github.com/repos/lampepfl/dotty/events","assignees_url":"https://api.github.com/repos/lampepfl/dotty/assignees{/user}","branches_url":"https://api.github.com/repos/lampepfl/dotty/branches{/branch}","tags_url":"https://api.github.com/repos/lampepfl/dotty/tags","blobs_url":"https://api.github.com/repos/lampepfl/dotty/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lampepfl/dotty/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lampepfl/dotty/git/refs{/sha}","trees_url":"https://api.github.com/repos/lampepfl/dotty/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lampepfl/dotty/statuses/{sha}","languages_url":"https://api.github.com/repos/lampepfl/dotty/languages","stargazers_url":"https://api.github.com/repos/lampepfl/dotty/stargazers","contributors_url":"https://api.github.com/repos/lampepfl/dotty/contributors","subscribers_url":"https://api.github.com/repos/lampepfl/dotty/subscribers","subscription_url":"https://api.github.com/repos/lampepfl/dotty/subscription","commits_url":"https://api.github.com/repos/lampepfl/dotty/commits{/sha}","git_commits_url":"https://api.github.com/repos/lampepfl/dotty/git/commits{/sha}","comments_url":"https://api.github.com/repos/lampepfl/dotty/comments{/number}","issue_comment_url":"https://api.github.com/repos/lampepfl/dotty/issues/comments{/number}","contents_url":"https://api.github.com/repos/lampepfl/dotty/contents/{+path}","compare_url":"https://api.github.com/repos/lampepfl/dotty/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lampepfl/dotty/merges","archive_url":"https://api.github.com/repos/lampepfl/dotty/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lampepfl/dotty/downloads","issues_url":"https://api.github.com/repos/lampepfl/dotty/issues{/number}","pulls_url":"https://api.github.com/repos/lampepfl/dotty/pulls{/number}","milestones_url":"https://api.github.com/repos/lampepfl/dotty/milestones{/number}","notifications_url":"https://api.github.com/repos/lampepfl/dotty/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lampepfl/dotty/labels{/name}","releases_url":"https://api.github.com/repos/lampepfl/dotty/releases{/id}","deployments_url":"https://api.github.com/repos/lampepfl/dotty/deployments","created_at":"2012-12-06T12:57:33Z","updated_at":"2017-05-31T17:56:19Z","pushed_at":"2017-05-31T19:11:22Z","git_url":"git://github.com/lampepfl/dotty.git","ssh_url":"git@github.com:lampepfl/dotty.git","clone_url":"https://github.com/lampepfl/dotty.git","svn_url":"https://github.com/lampepfl/dotty","homepage":"http://dotty.epfl.ch","size":89145,"stargazers_count":1660,"watchers_count":1660,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":242,"mirror_url":null,"open_issues_count":340,"forks":242,"open_issues":340,"watchers":1660,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lampepfl/dotty/pulls/2528"},"html":{"href":"https://github.com/lampepfl/dotty/pull/2528"},"issue":{"href":"https://api.github.com/repos/lampepfl/dotty/issues/2528"},"comments":{"href":"https://api.github.com/repos/lampepfl/dotty/issues/2528/comments"},"review_comments":{"href":"https://api.github.com/repos/lampepfl/dotty/pulls/2528/comments"},"review_comment":{"href":"https://api.github.com/repos/lampepfl/dotty/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lampepfl/dotty/pulls/2528/commits"},"statuses":{"href":"https://api.github.com/repos/lampepfl/dotty/statuses/b911233de6f9f12545b6c03cd579d3b31b52aa14"}}}}
{"actor":{"display_login":"abeln"}}