{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/11985","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/11985/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/11985/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/11985/events","html_url":"https://github.com/JuliaLang/julia/pull/11985","id":92553402,"number":11985,"title":"disallow 'global x' when x exists in outer scope","user":{"login":"ihnorton","id":327706,"avatar_url":"https://avatars.githubusercontent.com/u/327706?v=3","gravatar_id":"","url":"https://api.github.com/users/ihnorton","html_url":"https://github.com/ihnorton","followers_url":"https://api.github.com/users/ihnorton/followers","following_url":"https://api.github.com/users/ihnorton/following{/other_user}","gists_url":"https://api.github.com/users/ihnorton/gists{/gist_id}","starred_url":"https://api.github.com/users/ihnorton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ihnorton/subscriptions","organizations_url":"https://api.github.com/users/ihnorton/orgs","repos_url":"https://api.github.com/users/ihnorton/repos","events_url":"https://api.github.com/users/ihnorton/events{/privacy}","received_events_url":"https://api.github.com/users/ihnorton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-07-02T05:38:52Z","updated_at":"2015-07-02T23:57:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/11985","html_url":"https://github.com/JuliaLang/julia/pull/11985","diff_url":"https://github.com/JuliaLang/julia/pull/11985.diff","patch_url":"https://github.com/JuliaLang/julia/pull/11985.patch"},"body":"\"fixes\" #7264\r\nbefore:\r\n```\r\njulia> let\r\n         z = 4\r\n              let\r\n                  global z = 10\r\n              end\r\n         end\r\n10\r\njulia> z\r\nERROR: UndefVarError: z not defined\r\n```\r\n\r\nafter:\r\n```\r\nlet\r\n       z = 4\r\n       let\r\n           global z = 10\r\n       end\r\nend\r\nERROR: syntax: variable \"z\" declared local in enclosing scope\r\n```\r\n\r\nI guess ideally this ought to work, but at least giving an error makes the problem obvious immediately.\r\n\r\nAlternatively, if someone can suggest how to pass the annotation through I'll try to implement that.(~~...remember the variable and emit a a lambda when compiling the assignment block?~~ edit: ick, nevermind. that would be order-dependent)\r\n\r\n[av skip]"},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/118196847","html_url":"https://github.com/JuliaLang/julia/pull/11985#issuecomment-118196847","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/11985","id":118196847,"user":{"login":"mauro3","id":4098145,"avatar_url":"https://avatars.githubusercontent.com/u/4098145?v=3","gravatar_id":"","url":"https://api.github.com/users/mauro3","html_url":"https://github.com/mauro3","followers_url":"https://api.github.com/users/mauro3/followers","following_url":"https://api.github.com/users/mauro3/following{/other_user}","gists_url":"https://api.github.com/users/mauro3/gists{/gist_id}","starred_url":"https://api.github.com/users/mauro3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mauro3/subscriptions","organizations_url":"https://api.github.com/users/mauro3/orgs","repos_url":"https://api.github.com/users/mauro3/repos","events_url":"https://api.github.com/users/mauro3/events{/privacy}","received_events_url":"https://api.github.com/users/mauro3/received_events","type":"User","site_admin":false},"created_at":"2015-07-02T23:57:33Z","updated_at":"2015-07-02T23:57:33Z","body":"You're right about the inconsistency, but probably this is good enough."}}