{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/805","labels_url":"https://api.github.com/repos/facebook/flow/issues/805/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/805/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/805/events","html_url":"https://github.com/facebook/flow/issues/805","id":106681838,"number":805,"title":"Destructured declarations in for-of loop fail to parse","user":{"login":"AgentME","id":577345,"avatar_url":"https://avatars.githubusercontent.com/u/577345?v=3","gravatar_id":"","url":"https://api.github.com/users/AgentME","html_url":"https://github.com/AgentME","followers_url":"https://api.github.com/users/AgentME/followers","following_url":"https://api.github.com/users/AgentME/following{/other_user}","gists_url":"https://api.github.com/users/AgentME/gists{/gist_id}","starred_url":"https://api.github.com/users/AgentME/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AgentME/subscriptions","organizations_url":"https://api.github.com/users/AgentME/orgs","repos_url":"https://api.github.com/users/AgentME/repos","events_url":"https://api.github.com/users/AgentME/events{/privacy}","received_events_url":"https://api.github.com/users/AgentME/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/flow/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"gabelevi","id":1887264,"avatar_url":"https://avatars.githubusercontent.com/u/1887264?v=3","gravatar_id":"","url":"https://api.github.com/users/gabelevi","html_url":"https://github.com/gabelevi","followers_url":"https://api.github.com/users/gabelevi/followers","following_url":"https://api.github.com/users/gabelevi/following{/other_user}","gists_url":"https://api.github.com/users/gabelevi/gists{/gist_id}","starred_url":"https://api.github.com/users/gabelevi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabelevi/subscriptions","organizations_url":"https://api.github.com/users/gabelevi/orgs","repos_url":"https://api.github.com/users/gabelevi/repos","events_url":"https://api.github.com/users/gabelevi/events{/privacy}","received_events_url":"https://api.github.com/users/gabelevi/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-09-16T01:59:18Z","updated_at":"2015-09-20T16:03:00Z","closed_at":null,"body":"```javascript\r\n/* @flow */\r\nfor (var [x, y] of [[5,6],[7,8]]) {\r\n  console.log(x, y);\r\n}\r\n```\r\n\r\n```\r\n$ flow\r\n\r\n/private/tmp/a/test.js:2:10,15: Destructuring assignment must be initialized\r\n```\r\n\r\nThis error even happens for files without a `@flow` comment if they're imported from any files that do. Moving the `var` keyword out of the for-loop works around the issue for files without `@flow` comments:\r\n\r\n```javascript\r\nvar x, y;\r\nfor ([x, y] of [[5,6],[7,8]]) {\r\n  console.log(x, y);\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/flow/issues/comments/141802641","html_url":"https://github.com/facebook/flow/issues/805#issuecomment-141802641","issue_url":"https://api.github.com/repos/facebook/flow/issues/805","id":141802641,"user":{"login":"samwgoldman","id":254842,"avatar_url":"https://avatars.githubusercontent.com/u/254842?v=3","gravatar_id":"","url":"https://api.github.com/users/samwgoldman","html_url":"https://github.com/samwgoldman","followers_url":"https://api.github.com/users/samwgoldman/followers","following_url":"https://api.github.com/users/samwgoldman/following{/other_user}","gists_url":"https://api.github.com/users/samwgoldman/gists{/gist_id}","starred_url":"https://api.github.com/users/samwgoldman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samwgoldman/subscriptions","organizations_url":"https://api.github.com/users/samwgoldman/orgs","repos_url":"https://api.github.com/users/samwgoldman/repos","events_url":"https://api.github.com/users/samwgoldman/events{/privacy}","received_events_url":"https://api.github.com/users/samwgoldman/received_events","type":"User","site_admin":false},"created_at":"2015-09-20T16:03:00Z","updated_at":"2015-09-20T16:03:00Z","body":"@gabelevi I actually have a fix for this, which I tied into a fix for #830. Hopefully you didn't spend a lot of time on this already (assuming my fix is good)."}}