{"action":"opened","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/16965","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/16965/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/16965/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/16965/events","html_url":"https://github.com/JuliaLang/julia/issues/16965","id":160678883,"number":16965,"title":"Conditional Definition of Functions Incorrect Answer and Error","user":{"login":"ChrisRackauckas","id":1814174,"avatar_url":"https://avatars.githubusercontent.com/u/1814174?v=3","gravatar_id":"","url":"https://api.github.com/users/ChrisRackauckas","html_url":"https://github.com/ChrisRackauckas","followers_url":"https://api.github.com/users/ChrisRackauckas/followers","following_url":"https://api.github.com/users/ChrisRackauckas/following{/other_user}","gists_url":"https://api.github.com/users/ChrisRackauckas/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisRackauckas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisRackauckas/subscriptions","organizations_url":"https://api.github.com/users/ChrisRackauckas/orgs","repos_url":"https://api.github.com/users/ChrisRackauckas/repos","events_url":"https://api.github.com/users/ChrisRackauckas/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisRackauckas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-16T14:41:15Z","updated_at":"2016-06-16T14:41:15Z","closed_at":null,"body":"[This is from julia-users](https://groups.google.com/forum/#!topic/julia-users/IHKQVFVWSMY). The example is:\r\n\r\n```julia\r\nfunction g(a)\r\n  if a\r\n    f() = 2\r\n  else\r\n    f() = 3\r\n  end\r\n  return f\r\nend\r\nf = g(true)\r\nf() # Returns 3\r\n```\r\n\r\nWhat's also interesting is that g(false) in another REPL session gives an error: \"f not defined\". So in this setup you either get the second function (if you ask for the first one), or you get nothing! This is on Commit 59d1539 (4 days old master)."}}
{"actor":{"display_login":"ChrisRackauckas"}}