{"action":"created","comment":{"url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/comments/52759906","id":52759906,"diff_hunk":"@@ -172,6 +172,8 @@ enum : int\n     IgnorePrivateMembers    = 0x01, // don't find private members\n     IgnoreErrors            = 0x02, // don't give error messages\n     IgnoreAmbiguous         = 0x04, // return NULL if ambiguous\n+    IgnoreImports           = 0x08, // don't find symbols in imports\n+    IgnoreThisModule        = 0x10, // only look in imports","path":"src/dsymbol.d","position":5,"original_position":5,"commit_id":"b293c4c8478301d958c278e1acc63ce892a04f99","original_commit_id":"b293c4c8478301d958c278e1acc63ce892a04f99","user":{"login":"9rnsr","id":254394,"avatar_url":"https://avatars.githubusercontent.com/u/254394?v=3","gravatar_id":"","url":"https://api.github.com/users/9rnsr","html_url":"https://github.com/9rnsr","followers_url":"https://api.github.com/users/9rnsr/followers","following_url":"https://api.github.com/users/9rnsr/following{/other_user}","gists_url":"https://api.github.com/users/9rnsr/gists{/gist_id}","starred_url":"https://api.github.com/users/9rnsr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/9rnsr/subscriptions","organizations_url":"https://api.github.com/users/9rnsr/orgs","repos_url":"https://api.github.com/users/9rnsr/repos","events_url":"https://api.github.com/users/9rnsr/events{/privacy}","received_events_url":"https://api.github.com/users/9rnsr/received_events","type":"User","site_admin":false},"body":"`IgnoreThisModule` is hard to understand what happens. `IgnoreLocals` or `IgnoreLocalSymbol` is better I think.","created_at":"2016-02-12T16:07:17Z","updated_at":"2016-02-12T16:07:17Z","html_url":"https://github.com/D-Programming-Language/dmd/pull/5445#discussion_r52759906","pull_request_url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/5445","_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/comments/52759906"},"html":{"href":"https://github.com/D-Programming-Language/dmd/pull/5445#discussion_r52759906"},"pull_request":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/5445"}}},"pull_request":{"url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/5445","id":59137322,"html_url":"https://github.com/D-Programming-Language/dmd/pull/5445","diff_url":"https://github.com/D-Programming-Language/dmd/pull/5445.diff","patch_url":"https://github.com/D-Programming-Language/dmd/pull/5445.patch","issue_url":"https://api.github.com/repos/D-Programming-Language/dmd/issues/5445","number":5445,"state":"open","locked":false,"title":"fix Issue 10378 - Local imports hide local symbols","user":{"login":"WalterBright","id":568298,"avatar_url":"https://avatars.githubusercontent.com/u/568298?v=3","gravatar_id":"","url":"https://api.github.com/users/WalterBright","html_url":"https://github.com/WalterBright","followers_url":"https://api.github.com/users/WalterBright/followers","following_url":"https://api.github.com/users/WalterBright/following{/other_user}","gists_url":"https://api.github.com/users/WalterBright/gists{/gist_id}","starred_url":"https://api.github.com/users/WalterBright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WalterBright/subscriptions","organizations_url":"https://api.github.com/users/WalterBright/orgs","repos_url":"https://api.github.com/users/WalterBright/repos","events_url":"https://api.github.com/users/WalterBright/events{/privacy}","received_events_url":"https://api.github.com/users/WalterBright/received_events","type":"User","site_admin":false},"body":"This is a fix of https://issues.dlang.org/show_bug.cgi?id=10378 and a reboot of https://github.com/D-Programming-Language/dmd/pull/4915\r\n\r\nIt requires https://github.com/D-Programming-Language/phobos/pull/3989\r\n\r\nThis version is based on a comment Andrei made to me a long time ago about it. Symbol lookup is now done in two passes (formerly one). The first pass goes up through the scopes, checking everything but imported modules. If that fails, the scopes are gone through again, checking only imported modules.\r\n\r\nThis algorithm:\r\n\r\n1. retains the scoped nature of nested imports, i.e. names in nested imports **will hide** outer imported names\r\n2. works the same for function locals as it does for struct members, which was my complaint about #4915 \r\n3. does not issue errors for shadowing - it simply finds the shadowed symbol first.\r\n4. **breaks existing code**. Turns out that people did rely on it. See https://github.com/D-Programming-Language/phobos/pull/3989\r\n5. is pretty simple. (the large number of lines of code changed is mostly due to debugging and printing code which I'll remove once it passes the autotester\r\n6. exposed a bug in the way the compiler is implemented, see https://github.com/D-Programming-Language/phobos/pull/3989 for that, too. I'm sure there'll be other instances in the wild of this.\r\n7. it should only be a hair slower, as it never looks in the same hash table twice","created_at":"2016-02-12T06:17:47Z","updated_at":"2016-02-12T16:07:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d83d339c4f7d8072fe15417e4219802f97277f6e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/5445/commits","review_comments_url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/5445/comments","review_comment_url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/D-Programming-Language/dmd/issues/5445/comments","statuses_url":"https://api.github.com/repos/D-Programming-Language/dmd/statuses/b293c4c8478301d958c278e1acc63ce892a04f99","head":{"label":"WalterBright:fix10378-2","ref":"fix10378-2","sha":"b293c4c8478301d958c278e1acc63ce892a04f99","user":{"login":"WalterBright","id":568298,"avatar_url":"https://avatars.githubusercontent.com/u/568298?v=3","gravatar_id":"","url":"https://api.github.com/users/WalterBright","html_url":"https://github.com/WalterBright","followers_url":"https://api.github.com/users/WalterBright/followers","following_url":"https://api.github.com/users/WalterBright/following{/other_user}","gists_url":"https://api.github.com/users/WalterBright/gists{/gist_id}","starred_url":"https://api.github.com/users/WalterBright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WalterBright/subscriptions","organizations_url":"https://api.github.com/users/WalterBright/orgs","repos_url":"https://api.github.com/users/WalterBright/repos","events_url":"https://api.github.com/users/WalterBright/events{/privacy}","received_events_url":"https://api.github.com/users/WalterBright/received_events","type":"User","site_admin":false},"repo":{"id":7849157,"name":"dmd","full_name":"WalterBright/dmd","owner":{"login":"WalterBright","id":568298,"avatar_url":"https://avatars.githubusercontent.com/u/568298?v=3","gravatar_id":"","url":"https://api.github.com/users/WalterBright","html_url":"https://github.com/WalterBright","followers_url":"https://api.github.com/users/WalterBright/followers","following_url":"https://api.github.com/users/WalterBright/following{/other_user}","gists_url":"https://api.github.com/users/WalterBright/gists{/gist_id}","starred_url":"https://api.github.com/users/WalterBright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WalterBright/subscriptions","organizations_url":"https://api.github.com/users/WalterBright/orgs","repos_url":"https://api.github.com/users/WalterBright/repos","events_url":"https://api.github.com/users/WalterBright/events{/privacy}","received_events_url":"https://api.github.com/users/WalterBright/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/WalterBright/dmd","description":"dmd D Programming Language compiler","fork":true,"url":"https://api.github.com/repos/WalterBright/dmd","forks_url":"https://api.github.com/repos/WalterBright/dmd/forks","keys_url":"https://api.github.com/repos/WalterBright/dmd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WalterBright/dmd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WalterBright/dmd/teams","hooks_url":"https://api.github.com/repos/WalterBright/dmd/hooks","issue_events_url":"https://api.github.com/repos/WalterBright/dmd/issues/events{/number}","events_url":"https://api.github.com/repos/WalterBright/dmd/events","assignees_url":"https://api.github.com/repos/WalterBright/dmd/assignees{/user}","branches_url":"https://api.github.com/repos/WalterBright/dmd/branches{/branch}","tags_url":"https://api.github.com/repos/WalterBright/dmd/tags","blobs_url":"https://api.github.com/repos/WalterBright/dmd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WalterBright/dmd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WalterBright/dmd/git/refs{/sha}","trees_url":"https://api.github.com/repos/WalterBright/dmd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WalterBright/dmd/statuses/{sha}","languages_url":"https://api.github.com/repos/WalterBright/dmd/languages","stargazers_url":"https://api.github.com/repos/WalterBright/dmd/stargazers","contributors_url":"https://api.github.com/repos/WalterBright/dmd/contributors","subscribers_url":"https://api.github.com/repos/WalterBright/dmd/subscribers","subscription_url":"https://api.github.com/repos/WalterBright/dmd/subscription","commits_url":"https://api.github.com/repos/WalterBright/dmd/commits{/sha}","git_commits_url":"https://api.github.com/repos/WalterBright/dmd/git/commits{/sha}","comments_url":"https://api.github.com/repos/WalterBright/dmd/comments{/number}","issue_comment_url":"https://api.github.com/repos/WalterBright/dmd/issues/comments{/number}","contents_url":"https://api.github.com/repos/WalterBright/dmd/contents/{+path}","compare_url":"https://api.github.com/repos/WalterBright/dmd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WalterBright/dmd/merges","archive_url":"https://api.github.com/repos/WalterBright/dmd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WalterBright/dmd/downloads","issues_url":"https://api.github.com/repos/WalterBright/dmd/issues{/number}","pulls_url":"https://api.github.com/repos/WalterBright/dmd/pulls{/number}","milestones_url":"https://api.github.com/repos/WalterBright/dmd/milestones{/number}","notifications_url":"https://api.github.com/repos/WalterBright/dmd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WalterBright/dmd/labels{/name}","releases_url":"https://api.github.com/repos/WalterBright/dmd/releases{/id}","deployments_url":"https://api.github.com/repos/WalterBright/dmd/deployments","created_at":"2013-01-27T06:45:40Z","updated_at":"2015-08-23T08:04:14Z","pushed_at":"2016-02-12T10:51:44Z","git_url":"git://github.com/WalterBright/dmd.git","ssh_url":"git@github.com:WalterBright/dmd.git","clone_url":"https://github.com/WalterBright/dmd.git","svn_url":"https://github.com/WalterBright/dmd","homepage":"d-programming-language.org","size":65782,"stargazers_count":0,"watchers_count":0,"language":"D","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"D-Programming-Language:master","ref":"master","sha":"8b1dbac7af56ab60630b382fac29c5bdb9bc73e2","user":{"login":"D-Programming-Language","id":565913,"avatar_url":"https://avatars.githubusercontent.com/u/565913?v=3","gravatar_id":"","url":"https://api.github.com/users/D-Programming-Language","html_url":"https://github.com/D-Programming-Language","followers_url":"https://api.github.com/users/D-Programming-Language/followers","following_url":"https://api.github.com/users/D-Programming-Language/following{/other_user}","gists_url":"https://api.github.com/users/D-Programming-Language/gists{/gist_id}","starred_url":"https://api.github.com/users/D-Programming-Language/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/D-Programming-Language/subscriptions","organizations_url":"https://api.github.com/users/D-Programming-Language/orgs","repos_url":"https://api.github.com/users/D-Programming-Language/repos","events_url":"https://api.github.com/users/D-Programming-Language/events{/privacy}","received_events_url":"https://api.github.com/users/D-Programming-Language/received_events","type":"Organization","site_admin":false},"repo":{"id":1257070,"name":"dmd","full_name":"D-Programming-Language/dmd","owner":{"login":"D-Programming-Language","id":565913,"avatar_url":"https://avatars.githubusercontent.com/u/565913?v=3","gravatar_id":"","url":"https://api.github.com/users/D-Programming-Language","html_url":"https://github.com/D-Programming-Language","followers_url":"https://api.github.com/users/D-Programming-Language/followers","following_url":"https://api.github.com/users/D-Programming-Language/following{/other_user}","gists_url":"https://api.github.com/users/D-Programming-Language/gists{/gist_id}","starred_url":"https://api.github.com/users/D-Programming-Language/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/D-Programming-Language/subscriptions","organizations_url":"https://api.github.com/users/D-Programming-Language/orgs","repos_url":"https://api.github.com/users/D-Programming-Language/repos","events_url":"https://api.github.com/users/D-Programming-Language/events{/privacy}","received_events_url":"https://api.github.com/users/D-Programming-Language/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/D-Programming-Language/dmd","description":"dmd D Programming Language compiler","fork":false,"url":"https://api.github.com/repos/D-Programming-Language/dmd","forks_url":"https://api.github.com/repos/D-Programming-Language/dmd/forks","keys_url":"https://api.github.com/repos/D-Programming-Language/dmd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/D-Programming-Language/dmd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/D-Programming-Language/dmd/teams","hooks_url":"https://api.github.com/repos/D-Programming-Language/dmd/hooks","issue_events_url":"https://api.github.com/repos/D-Programming-Language/dmd/issues/events{/number}","events_url":"https://api.github.com/repos/D-Programming-Language/dmd/events","assignees_url":"https://api.github.com/repos/D-Programming-Language/dmd/assignees{/user}","branches_url":"https://api.github.com/repos/D-Programming-Language/dmd/branches{/branch}","tags_url":"https://api.github.com/repos/D-Programming-Language/dmd/tags","blobs_url":"https://api.github.com/repos/D-Programming-Language/dmd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/D-Programming-Language/dmd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/D-Programming-Language/dmd/git/refs{/sha}","trees_url":"https://api.github.com/repos/D-Programming-Language/dmd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/D-Programming-Language/dmd/statuses/{sha}","languages_url":"https://api.github.com/repos/D-Programming-Language/dmd/languages","stargazers_url":"https://api.github.com/repos/D-Programming-Language/dmd/stargazers","contributors_url":"https://api.github.com/repos/D-Programming-Language/dmd/contributors","subscribers_url":"https://api.github.com/repos/D-Programming-Language/dmd/subscribers","subscription_url":"https://api.github.com/repos/D-Programming-Language/dmd/subscription","commits_url":"https://api.github.com/repos/D-Programming-Language/dmd/commits{/sha}","git_commits_url":"https://api.github.com/repos/D-Programming-Language/dmd/git/commits{/sha}","comments_url":"https://api.github.com/repos/D-Programming-Language/dmd/comments{/number}","issue_comment_url":"https://api.github.com/repos/D-Programming-Language/dmd/issues/comments{/number}","contents_url":"https://api.github.com/repos/D-Programming-Language/dmd/contents/{+path}","compare_url":"https://api.github.com/repos/D-Programming-Language/dmd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/D-Programming-Language/dmd/merges","archive_url":"https://api.github.com/repos/D-Programming-Language/dmd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/D-Programming-Language/dmd/downloads","issues_url":"https://api.github.com/repos/D-Programming-Language/dmd/issues{/number}","pulls_url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls{/number}","milestones_url":"https://api.github.com/repos/D-Programming-Language/dmd/milestones{/number}","notifications_url":"https://api.github.com/repos/D-Programming-Language/dmd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/D-Programming-Language/dmd/labels{/name}","releases_url":"https://api.github.com/repos/D-Programming-Language/dmd/releases{/id}","deployments_url":"https://api.github.com/repos/D-Programming-Language/dmd/deployments","created_at":"2011-01-15T06:53:53Z","updated_at":"2016-02-12T11:04:35Z","pushed_at":"2016-02-12T15:20:31Z","git_url":"git://github.com/D-Programming-Language/dmd.git","ssh_url":"git@github.com:D-Programming-Language/dmd.git","clone_url":"https://github.com/D-Programming-Language/dmd.git","svn_url":"https://github.com/D-Programming-Language/dmd","homepage":"dlang.org","size":84960,"stargazers_count":1178,"watchers_count":1178,"language":"D","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":356,"mirror_url":null,"open_issues_count":139,"forks":356,"open_issues":139,"watchers":1178,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/5445"},"html":{"href":"https://github.com/D-Programming-Language/dmd/pull/5445"},"issue":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/issues/5445"},"comments":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/issues/5445/comments"},"review_comments":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/5445/comments"},"review_comment":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/5445/commits"},"statuses":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/statuses/b293c4c8478301d958c278e1acc63ce892a04f99"}}}}