{"action":"created","issue":{"url":"https://api.github.com/repos/babel/babel/issues/4893","repository_url":"https://api.github.com/repos/babel/babel","labels_url":"https://api.github.com/repos/babel/babel/issues/4893/labels{/name}","comments_url":"https://api.github.com/repos/babel/babel/issues/4893/comments","events_url":"https://api.github.com/repos/babel/babel/issues/4893/events","html_url":"https://github.com/babel/babel/issues/4893","id":191566555,"number":4893,"title":"Incorrect destructuring in for loops","user":{"login":"julien-f","id":298721,"avatar_url":"https://avatars.githubusercontent.com/u/298721?v=3","gravatar_id":"","url":"https://api.github.com/users/julien-f","html_url":"https://github.com/julien-f","followers_url":"https://api.github.com/users/julien-f/followers","following_url":"https://api.github.com/users/julien-f/following{/other_user}","gists_url":"https://api.github.com/users/julien-f/gists{/gist_id}","starred_url":"https://api.github.com/users/julien-f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julien-f/subscriptions","organizations_url":"https://api.github.com/users/julien-f/orgs","repos_url":"https://api.github.com/users/julien-f/repos","events_url":"https://api.github.com/users/julien-f/events{/privacy}","received_events_url":"https://api.github.com/users/julien-f/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-24T17:11:22Z","updated_at":"2016-11-24T17:21:37Z","closed_at":null,"body":"### Input Code\r\n<!--- If you're describing a bug, please let us know which sample code reproduces your problem -->\r\n\r\n```js\r\nconst f = range => {\r\n  for (let [ i, n ] = range; i <= n; ++i) {\r\n    console.log(i)\r\n  }\r\n}\r\n```\r\n\r\n### Babel Configuration (.babelrc, package.json, cli command)\r\n<!--- If describing a bug, tell us what your babel configuration looks like -->\r\n\r\n```js\r\n{\r\n  \"presets\": [ \"es2015\" ]\r\n}\r\n```\r\n\r\n### Expected Behavior\r\n\r\n```js\r\nvar f = function f(range) {\r\n  var _range = _slicedToArray(range, 2);\r\n  for (var i = _range[0], n = _range[1]; i <= n; ++i) {\r\n    console.log(i);\r\n  }\r\n};\r\n```\r\n\r\n### Current Behavior\r\n\r\n```js\r\nvar f = function f(range) {\r\n  for (function () {\r\n    var _range = _slicedToArray(range, 2);\r\n\r\n    var i = _range[0],\r\n        n = _range[1];\r\n  }(); i <= n; ++i) {\r\n    console.log(i);\r\n  }\r\n};\r\n```\r\n\r\nSee in the [REPL](https://babeljs.io/repl/#?babili=false&evaluate=true&lineWrap=false&presets=es2015&code=const%20f%20%3D%20(range)%20%3D%3E%20%7B%0A%20%20for%20(let%20%5B%20i%2C%20n%20%5D%20%3D%20range%3B%20i%20%3C%3D%20n%3B%20%2B%2Bi)%20%7B%0A%20%20%20%20console.log(i)%0A%20%20%7D%0A%7D%0Af(%5B0%2C%2010%5D)).\r\n\r\n### Possible Solution\r\n<!--- Not obligatory, but suggest a fix/reason for the bug, -->\r\n<!--- or ideas how to implement the addition or change -->\r\n\r\n### Context\r\n<!--- How has this issue affected you? What are you trying to accomplish? -->\r\n<!--- Providing context helps us come up with a solution that is most useful in the real world -->\r\n\r\n### Your Environment\r\n<!--- Include as many relevant details about the environment you experienced the bug in -->\r\n\r\n| software         | version\r\n| ---------------- | -------\r\n| Babel            |  6.18.2\r\n| node             | 6.9.1\r\n| npm              | 4.0.2\r\n| Operating System | Debian \r\n"},"comment":{"url":"https://api.github.com/repos/babel/babel/issues/comments/262821211","html_url":"https://github.com/babel/babel/issues/4893#issuecomment-262821211","issue_url":"https://api.github.com/repos/babel/babel/issues/4893","id":262821211,"user":{"login":"julien-f","id":298721,"avatar_url":"https://avatars.githubusercontent.com/u/298721?v=3","gravatar_id":"","url":"https://api.github.com/users/julien-f","html_url":"https://github.com/julien-f","followers_url":"https://api.github.com/users/julien-f/followers","following_url":"https://api.github.com/users/julien-f/following{/other_user}","gists_url":"https://api.github.com/users/julien-f/gists{/gist_id}","starred_url":"https://api.github.com/users/julien-f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julien-f/subscriptions","organizations_url":"https://api.github.com/users/julien-f/orgs","repos_url":"https://api.github.com/users/julien-f/repos","events_url":"https://api.github.com/users/julien-f/events{/privacy}","received_events_url":"https://api.github.com/users/julien-f/received_events","type":"User","site_admin":false},"created_at":"2016-11-24T17:21:37Z","updated_at":"2016-11-24T17:21:37Z","body":"I destructed myself for now :)"}}
{"actor":{"display_login":"julien-f"}}