{"action":"created","comment":{"url":"https://api.github.com/repos/scala/scala/pulls/comments/93510381","pull_request_review_id":14039765,"id":93510381,"diff_hunk":"@@ -984,6 +985,10 @@ trait Contexts { self: Analyzer =>\n \n     def isNameInScope(name: Name) = lookupSymbol(name, _ => true).isSuccess\n \n+    def isPlainClassInJavaUnit(sym: Symbol): Boolean =\n+      unit.isJava && sym.isJavaDefined && sym.isClass && !sym.isModuleClass && !sym.isPackageClass","path":"src/compiler/scala/tools/nsc/typechecker/Contexts.scala","position":16,"original_position":16,"commit_id":"8e263fcd8a0c49fe1f8efd117bf80dc33bf46f0c","original_commit_id":"8e263fcd8a0c49fe1f8efd117bf80dc33bf46f0c","user":{"login":"adriaanm","id":91083,"avatar_url":"https://avatars.githubusercontent.com/u/91083?v=3","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},"body":"Why exclude `sym.isModuleClass`? I'm trying to get this scenario to work (using scaladoc to more eagerly force infos):\r\n```\r\npublic class A {\r\n    public static class T {}\r\n}\r\npublic class B extends A {\r\n    public static class U extends T { }\r\n//                                  ^\r\n// error: not found: type T\r\n}\r\n```\r\n","created_at":"2016-12-21T20:07:40Z","updated_at":"2016-12-21T20:07:40Z","html_url":"https://github.com/scala/scala/pull/5606#discussion_r93510381","pull_request_url":"https://api.github.com/repos/scala/scala/pulls/5606","_links":{"self":{"href":"https://api.github.com/repos/scala/scala/pulls/comments/93510381"},"html":{"href":"https://github.com/scala/scala/pull/5606#discussion_r93510381"},"pull_request":{"href":"https://api.github.com/repos/scala/scala/pulls/5606"}}},"pull_request":{"url":"https://api.github.com/repos/scala/scala/pulls/5606","id":98640394,"html_url":"https://github.com/scala/scala/pull/5606","diff_url":"https://github.com/scala/scala/pull/5606.diff","patch_url":"https://github.com/scala/scala/pull/5606.patch","issue_url":"https://api.github.com/repos/scala/scala/issues/5606","number":5606,"state":"open","locked":false,"title":"SI-9111 / SI-10107 resolution of static references in Java code","user":{"login":"lrytz","id":119636,"avatar_url":"https://avatars.githubusercontent.com/u/119636?v=3","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":"Scala puts static members of Java classes into the companion\r\nobject symbol. When parsing Java code, references to static\r\nmembers need to be looked up in these companions.\r\n\r\nIn 2.11.x, a synthetic `import A._` was added to Java classes\r\nhaving static members, which lead to some bugs (SI-9111). The\r\nscheme was changed in 4e822d7 (2.12.x only): when a lookup\r\nof `T` / `A.T` fails, the typer searches in the companion of the\r\ncurrent class.\r\n\r\nThis fixes some issues, but not all\r\n  - In Java, `A.T` can refer to a static member defined in a\r\n    parent of `A`\r\n  - If a static `A.T` exists, but a parent of `A` defines a\r\n    non-static member class `T`, the non-static one would be\r\n    chosen (wrongly)\r\n\r\nThis commit pushes the logic to consider companion objects into\r\n`FindMembers` and makes sure that for ever class in the base type\r\nsequence, the companion is considered before moving to the next\r\nbase type.\r\n","created_at":"2016-12-19T21:11:00Z","updated_at":"2016-12-21T20:07:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f537914512c05f6a6f043bded3def091b3412b8d","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/scala/scala/milestones/59","html_url":"https://github.com/scala/scala/milestone/59","labels_url":"https://api.github.com/repos/scala/scala/milestones/59/labels","id":2100825,"number":59,"title":"2.12.2","description":"Merge to 2.12.x. ","creator":{"login":"adriaanm","id":91083,"avatar_url":"https://avatars.githubusercontent.com/u/91083?v=3","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":25,"closed_issues":32,"state":"open","created_at":"2016-10-28T22:48:34Z","updated_at":"2016-12-21T19:25:44Z","due_on":"2017-02-27T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/scala/scala/pulls/5606/commits","review_comments_url":"https://api.github.com/repos/scala/scala/pulls/5606/comments","review_comment_url":"https://api.github.com/repos/scala/scala/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scala/scala/issues/5606/comments","statuses_url":"https://api.github.com/repos/scala/scala/statuses/8e263fcd8a0c49fe1f8efd117bf80dc33bf46f0c","head":{"label":"lrytz:t10107","ref":"t10107","sha":"8e263fcd8a0c49fe1f8efd117bf80dc33bf46f0c","user":{"login":"lrytz","id":119636,"avatar_url":"https://avatars.githubusercontent.com/u/119636?v=3","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=3","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}","deployments_url":"https://api.github.com/repos/lrytz/scala/deployments","created_at":"2011-12-01T13:16:01Z","updated_at":"2016-08-23T13:40:52Z","pushed_at":"2016-12-21T15:44:35Z","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":80921,"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.12.x"}},"base":{"label":"scala:2.12.x","ref":"2.12.x","sha":"246653f024c13ba0348fec3f83b147de11251fe3","user":{"login":"scala","id":57059,"avatar_url":"https://avatars.githubusercontent.com/u/57059?v=3","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=3","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}","deployments_url":"https://api.github.com/repos/scala/scala/deployments","created_at":"2011-12-01T05:02:34Z","updated_at":"2016-12-21T06:04:56Z","pushed_at":"2016-12-21T19:25:44Z","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":81773,"stargazers_count":7370,"watchers_count":7370,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1892,"mirror_url":null,"open_issues_count":49,"forks":1892,"open_issues":49,"watchers":7370,"default_branch":"2.12.x"}},"_links":{"self":{"href":"https://api.github.com/repos/scala/scala/pulls/5606"},"html":{"href":"https://github.com/scala/scala/pull/5606"},"issue":{"href":"https://api.github.com/repos/scala/scala/issues/5606"},"comments":{"href":"https://api.github.com/repos/scala/scala/issues/5606/comments"},"review_comments":{"href":"https://api.github.com/repos/scala/scala/pulls/5606/comments"},"review_comment":{"href":"https://api.github.com/repos/scala/scala/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scala/scala/pulls/5606/commits"},"statuses":{"href":"https://api.github.com/repos/scala/scala/statuses/8e263fcd8a0c49fe1f8efd117bf80dc33bf46f0c"}}}}
{"actor":{"display_login":"adriaanm"}}