{"action":"closed","issue":{"url":"https://api.github.com/repos/decaffeinate/decaffeinate/issues/1301","repository_url":"https://api.github.com/repos/decaffeinate/decaffeinate","labels_url":"https://api.github.com/repos/decaffeinate/decaffeinate/issues/1301/labels{/name}","comments_url":"https://api.github.com/repos/decaffeinate/decaffeinate/issues/1301/comments","events_url":"https://api.github.com/repos/decaffeinate/decaffeinate/issues/1301/events","html_url":"https://github.com/decaffeinate/decaffeinate/issues/1301","id":308308677,"number":1301,"title":"Support object shorthand with computed keys","user":{"login":"alangpierce","id":211605,"avatar_url":"https://avatars1.githubusercontent.com/u/211605?v=4","gravatar_id":"","url":"https://api.github.com/users/alangpierce","html_url":"https://github.com/alangpierce","followers_url":"https://api.github.com/users/alangpierce/followers","following_url":"https://api.github.com/users/alangpierce/following{/other_user}","gists_url":"https://api.github.com/users/alangpierce/gists{/gist_id}","starred_url":"https://api.github.com/users/alangpierce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alangpierce/subscriptions","organizations_url":"https://api.github.com/users/alangpierce/orgs","repos_url":"https://api.github.com/users/alangpierce/repos","events_url":"https://api.github.com/users/alangpierce/events{/privacy}","received_events_url":"https://api.github.com/users/alangpierce/received_events","type":"User","site_admin":false},"labels":[{"id":167086390,"url":"https://api.github.com/repos/decaffeinate/decaffeinate/labels/crash","name":"crash","color":"fc2929","default":false}],"state":"closed","locked":false,"assignee":{"login":"alangpierce","id":211605,"avatar_url":"https://avatars1.githubusercontent.com/u/211605?v=4","gravatar_id":"","url":"https://api.github.com/users/alangpierce","html_url":"https://github.com/alangpierce","followers_url":"https://api.github.com/users/alangpierce/followers","following_url":"https://api.github.com/users/alangpierce/following{/other_user}","gists_url":"https://api.github.com/users/alangpierce/gists{/gist_id}","starred_url":"https://api.github.com/users/alangpierce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alangpierce/subscriptions","organizations_url":"https://api.github.com/users/alangpierce/orgs","repos_url":"https://api.github.com/users/alangpierce/repos","events_url":"https://api.github.com/users/alangpierce/events{/privacy}","received_events_url":"https://api.github.com/users/alangpierce/received_events","type":"User","site_admin":false},"assignees":[{"login":"alangpierce","id":211605,"avatar_url":"https://avatars1.githubusercontent.com/u/211605?v=4","gravatar_id":"","url":"https://api.github.com/users/alangpierce","html_url":"https://github.com/alangpierce","followers_url":"https://api.github.com/users/alangpierce/followers","following_url":"https://api.github.com/users/alangpierce/following{/other_user}","gists_url":"https://api.github.com/users/alangpierce/gists{/gist_id}","starred_url":"https://api.github.com/users/alangpierce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alangpierce/subscriptions","organizations_url":"https://api.github.com/users/alangpierce/orgs","repos_url":"https://api.github.com/users/alangpierce/repos","events_url":"https://api.github.com/users/alangpierce/events{/privacy}","received_events_url":"https://api.github.com/users/alangpierce/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-03-24T23:43:22Z","updated_at":"2018-03-25T18:10:33Z","closed_at":"2018-03-25T18:10:33Z","author_association":"OWNER","body":"decaffeinate is crashing on my CoffeeScript input:\r\n\r\n```coffee\r\nobj = {[a]}\r\n```\r\n\r\n[(repl)](https://decaffeinate-project.org/repl/#?useCS2=true&useJSModules=false&loose=false&evaluate=true&stage=full&code=obj%20%3D%20%7B%5Ba%5D%7D)\r\n\r\nI get this error:\r\n\r\n```\r\nAddVariableDeclarationsStage failed to parse: Unexpected token (1:10)\r\n> 1 | obj = {[a]};\r\n    |           ^\r\n```\r\n\r\nCoffeeScript allows this syntax, but JS doesn't, so we need to expand the shorthand in this case and also save the result to a temp variable if it's not repeatable. We already handle `{\"#{a()}\"}` properly, so this should be nearly the same."}}
{"actor":{"display_login":"alangpierce"}}