{"action":"opened","issue":{"url":"https://api.github.com/repos/Microsoft/pxt/issues/333","repository_url":"https://api.github.com/repos/Microsoft/pxt","labels_url":"https://api.github.com/repos/Microsoft/pxt/issues/333/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/pxt/issues/333/comments","events_url":"https://api.github.com/repos/Microsoft/pxt/issues/333/events","html_url":"https://github.com/Microsoft/pxt/issues/333","id":176508981,"number":333,"title":"We don't check variable names when decompiling for loops","user":{"login":"riknoll","id":13754588,"avatar_url":"https://avatars.githubusercontent.com/u/13754588?v=3","gravatar_id":"","url":"https://api.github.com/users/riknoll","html_url":"https://github.com/riknoll","followers_url":"https://api.github.com/users/riknoll/followers","following_url":"https://api.github.com/users/riknoll/following{/other_user}","gists_url":"https://api.github.com/users/riknoll/gists{/gist_id}","starred_url":"https://api.github.com/users/riknoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riknoll/subscriptions","organizations_url":"https://api.github.com/users/riknoll/orgs","repos_url":"https://api.github.com/users/riknoll/repos","events_url":"https://api.github.com/users/riknoll/events{/privacy}","received_events_url":"https://api.github.com/users/riknoll/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/pxt/labels/Blocks%20%3C==%3E%20TypeScript","name":"Blocks <==> TypeScript","color":"5319e7"},{"url":"https://api.github.com/repos/Microsoft/pxt/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"riknoll","id":13754588,"avatar_url":"https://avatars.githubusercontent.com/u/13754588?v=3","gravatar_id":"","url":"https://api.github.com/users/riknoll","html_url":"https://github.com/riknoll","followers_url":"https://api.github.com/users/riknoll/followers","following_url":"https://api.github.com/users/riknoll/following{/other_user}","gists_url":"https://api.github.com/users/riknoll/gists{/gist_id}","starred_url":"https://api.github.com/users/riknoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riknoll/subscriptions","organizations_url":"https://api.github.com/users/riknoll/orgs","repos_url":"https://api.github.com/users/riknoll/repos","events_url":"https://api.github.com/users/riknoll/events{/privacy}","received_events_url":"https://api.github.com/users/riknoll/received_events","type":"User","site_admin":false},"assignees":[{"login":"riknoll","id":13754588,"avatar_url":"https://avatars.githubusercontent.com/u/13754588?v=3","gravatar_id":"","url":"https://api.github.com/users/riknoll","html_url":"https://github.com/riknoll","followers_url":"https://api.github.com/users/riknoll/followers","following_url":"https://api.github.com/users/riknoll/following{/other_user}","gists_url":"https://api.github.com/users/riknoll/gists{/gist_id}","starred_url":"https://api.github.com/users/riknoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riknoll/subscriptions","organizations_url":"https://api.github.com/users/riknoll/orgs","repos_url":"https://api.github.com/users/riknoll/repos","events_url":"https://api.github.com/users/riknoll/events{/privacy}","received_events_url":"https://api.github.com/users/riknoll/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2016-09-12T23:16:58Z","updated_at":"2016-09-12T23:16:58Z","closed_at":null,"body":"For loops must be of this form to be decompiled:\r\n```typescript\r\nfor (let var_name = 0; var_name < some_expression; var_name++  ) {}\r\n```\r\nHowever, we don't actually check to make sure the `var_name` is the same across all parts. The following will decompile:\r\n```typescript\r\nlet item = 0\r\nfor (let i = 0; item < 5; i++) {}\r\nfor (let i = 0; i < 5; item++) {}\r\n```\r\nThis gets caught by the roundtrip check, but we should error out before that"}}
{"actor":{"display_login":"riknoll"}}