{"action":"closed","issue":{"url":"https://api.github.com/repos/babel/babel/issues/1146","labels_url":"https://api.github.com/repos/babel/babel/issues/1146/labels{/name}","comments_url":"https://api.github.com/repos/babel/babel/issues/1146/comments","events_url":"https://api.github.com/repos/babel/babel/issues/1146/events","html_url":"https://github.com/babel/babel/issues/1146","id":66150234,"number":1146,"title":"Invalid output on async + destructuring parameter / arguments","user":{"login":"bottleofwater","id":11786120,"avatar_url":"https://avatars.githubusercontent.com/u/11786120?v=3","gravatar_id":"","url":"https://api.github.com/users/bottleofwater","html_url":"https://github.com/bottleofwater","followers_url":"https://api.github.com/users/bottleofwater/followers","following_url":"https://api.github.com/users/bottleofwater/following{/other_user}","gists_url":"https://api.github.com/users/bottleofwater/gists{/gist_id}","starred_url":"https://api.github.com/users/bottleofwater/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bottleofwater/subscriptions","organizations_url":"https://api.github.com/users/bottleofwater/orgs","repos_url":"https://api.github.com/users/bottleofwater/repos","events_url":"https://api.github.com/users/bottleofwater/events{/privacy}","received_events_url":"https://api.github.com/users/bottleofwater/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-03T13:48:37Z","updated_at":"2015-04-03T13:49:25Z","closed_at":"2015-04-03T13:49:25Z","body":"Hi,\r\n\r\n[(demo)](https://babeljs.io/repl/#?experimental=true&evaluate=false&loose=false&spec=false&code=async%20function%20test(%20%7B%20a%20%7D%20%3D%20%7B%20%7D%20)%20%7B%0A%20%20alert(%20a%20)%3B%0A%20%20alert(%20arguments%20)%3B%0A%7D%0A%0Atest(%20%7B%20a%20%3A%2010%20%7D%20)%3B%0A)\r\n\r\n```js\r\nasync function test( { a } = { } ) {\r\n  alert( a );\r\n  alert( arguments );\r\n}\r\n\r\ntest( { a : 10 } );\r\n```\r\n\r\nBabel will alert undefined, because the destructuring parameters are evaluated inside the regenerator wrapper, which doesn't preserve the `arguments` variable. Actually, any use of `arguments` inside the body of an async function will fail.\r\n"}}