{"action":"closed","issue":{"url":"https://api.github.com/repos/google/closure-compiler/issues/1722","repository_url":"https://api.github.com/repos/google/closure-compiler","labels_url":"https://api.github.com/repos/google/closure-compiler/issues/1722/labels{/name}","comments_url":"https://api.github.com/repos/google/closure-compiler/issues/1722/comments","events_url":"https://api.github.com/repos/google/closure-compiler/issues/1722/events","html_url":"https://github.com/google/closure-compiler/issues/1722","id":147513004,"number":1722,"title":"Dead code is not removed from switch statements","user":{"login":"vincent-dm","id":8799841,"avatar_url":"https://avatars.githubusercontent.com/u/8799841?v=3","gravatar_id":"","url":"https://api.github.com/users/vincent-dm","html_url":"https://github.com/vincent-dm","followers_url":"https://api.github.com/users/vincent-dm/followers","following_url":"https://api.github.com/users/vincent-dm/following{/other_user}","gists_url":"https://api.github.com/users/vincent-dm/gists{/gist_id}","starred_url":"https://api.github.com/users/vincent-dm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vincent-dm/subscriptions","organizations_url":"https://api.github.com/users/vincent-dm/orgs","repos_url":"https://api.github.com/users/vincent-dm/repos","events_url":"https://api.github.com/users/vincent-dm/events{/privacy}","received_events_url":"https://api.github.com/users/vincent-dm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/google/closure-compiler/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-04-11T18:27:58Z","updated_at":"2016-04-28T23:24:15Z","closed_at":"2016-04-28T23:24:15Z","body":"I am trying to compile a separate version of my web app for each language.\r\nTherefore, I want to include only the translations for that language, using the goog.LOCALE parameter I set during compilation.\r\n\r\nHowever, this leads to this kind of output under advanced mode (example with `goog.LOCALE = \"nl\"`):\r\n```js\r\nvar bs = function(){\r\n  switch(\"nl\") { \r\n    case \"nl\": return {\"al\": \"mijn\", \"Nederlandstalige\": \"vertalingen\"};\r\n    case \"fr\": return {\"tous\": \"mes\", \"traductions\": \"françaises\"};\r\n    default: return {\"all\": \"my\", \"english\": \"translations\"}\r\n  }\r\n}();\r\n```\r\n_(I added the whitespace for readability, the object with the translations is obviously also different in reality)_\r\n\r\nThe first case of this switch statement will always be true, so I don't understand why it is not removed by the Closure Compiler.\r\n\r\nAm I doing something wrong or are these optimization not yet supported?"}}