{"action":"opened","issue":{"url":"https://api.github.com/repos/rollup/rollup/issues/1208","repository_url":"https://api.github.com/repos/rollup/rollup","labels_url":"https://api.github.com/repos/rollup/rollup/issues/1208/labels{/name}","comments_url":"https://api.github.com/repos/rollup/rollup/issues/1208/comments","events_url":"https://api.github.com/repos/rollup/rollup/issues/1208/events","html_url":"https://github.com/rollup/rollup/issues/1208","id":198240780,"number":1208,"title":"Assigning to function parameters defeats tree-shaking","user":{"login":"Rich-Harris","id":1162160,"avatar_url":"https://avatars.githubusercontent.com/u/1162160?v=3","gravatar_id":"","url":"https://api.github.com/users/Rich-Harris","html_url":"https://github.com/Rich-Harris","followers_url":"https://api.github.com/users/Rich-Harris/followers","following_url":"https://api.github.com/users/Rich-Harris/following{/other_user}","gists_url":"https://api.github.com/users/Rich-Harris/gists{/gist_id}","starred_url":"https://api.github.com/users/Rich-Harris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rich-Harris/subscriptions","organizations_url":"https://api.github.com/users/Rich-Harris/orgs","repos_url":"https://api.github.com/users/Rich-Harris/repos","events_url":"https://api.github.com/users/Rich-Harris/events{/privacy}","received_events_url":"https://api.github.com/users/Rich-Harris/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-31T17:40:27Z","updated_at":"2016-12-31T17:40:27Z","closed_at":null,"body":"[This](http://rollupjs.org/?version=0.39.2&shareable=JTdCJTIyb3B0aW9ucyUyMiUzQSU3QiUyMmZvcm1hdCUyMiUzQSUyMmNqcyUyMiUyQyUyMm1vZHVsZU5hbWUlMjIlM0ElMjJteUJ1bmRsZSUyMiUyQyUyMmdsb2JhbHMlMjIlM0ElN0IlN0QlN0QlMkMlMjJtb2R1bGVzJTIyJTNBJTVCJTdCJTIybmFtZSUyMiUzQSUyMm1haW4uanMlMjIlMkMlMjJjb2RlJTIyJTNBJTIyZnVuY3Rpb24lMjBmb28lMjAoJTIweCUyMCklMjAlN0IlNUNuJTIwJTIwaWYlMjAoJTIwIXglMjApJTIweCUyMCUzRCUyMDIlM0IlNUNuJTIwJTIwcmV0dXJuJTIweCUyMColMjAyJTNCJTVDbiU3RCU1Q24lNUNudmFyJTIwdW51c2VkJTIwJTNEJTIwZm9vKCUyMDElMjApJTNCJTIyJTdEJTVEJTdE) makes it impossible to do things like defaults:\r\n\r\n```js\r\nfunction foo ( x ) {\r\n  if ( !x ) x = 2; // without this line, everything would be tree-shaken\r\n  return x * 2;\r\n}\r\n\r\nvar unused = foo( 1 );\r\n```"}}
{"actor":{"display_login":"Rich-Harris"}}