{"action":"closed","issue":{"url":"https://api.github.com/repos/google/closure-compiler/issues/899","labels_url":"https://api.github.com/repos/google/closure-compiler/issues/899/labels{/name}","comments_url":"https://api.github.com/repos/google/closure-compiler/issues/899/comments","events_url":"https://api.github.com/repos/google/closure-compiler/issues/899/events","html_url":"https://github.com/google/closure-compiler/issues/899","id":66524895,"number":899,"title":"Different semantics caused by reordering function definitions","user":{"login":"JacksonGL","id":4462454,"avatar_url":"https://avatars.githubusercontent.com/u/4462454?v=3","gravatar_id":"","url":"https://api.github.com/users/JacksonGL","html_url":"https://github.com/JacksonGL","followers_url":"https://api.github.com/users/JacksonGL/followers","following_url":"https://api.github.com/users/JacksonGL/following{/other_user}","gists_url":"https://api.github.com/users/JacksonGL/gists{/gist_id}","starred_url":"https://api.github.com/users/JacksonGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JacksonGL/subscriptions","organizations_url":"https://api.github.com/users/JacksonGL/orgs","repos_url":"https://api.github.com/users/JacksonGL/repos","events_url":"https://api.github.com/users/JacksonGL/events{/privacy}","received_events_url":"https://api.github.com/users/JacksonGL/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-06T04:45:23Z","updated_at":"2015-04-06T16:32:13Z","closed_at":"2015-04-06T16:32:13Z","body":"The following code prints ```2```:\r\n```javascript\r\ntry {\r\n\tfunction fun(bodies) {\r\n\t\tconsole.log(1);\r\n\t}\r\n\r\n\tfunction fun(bodies) {\r\n\t\tconsole.log(2);\r\n\t}\r\n\tfun();\r\n} catch (ex) {}\r\n```\r\nAfter simple optimization, the compressed code prints ```1```:\r\n```javascript\r\ntry{var fun=function(a){console.log(2)},fun=function(a){console.log(1)};fun()}catch(ex){};\r\n```"}}