{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/jstransform/issues/79","labels_url":"https://api.github.com/repos/facebook/jstransform/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/facebook/jstransform/issues/79/comments","events_url":"https://api.github.com/repos/facebook/jstransform/issues/79/events","html_url":"https://github.com/facebook/jstransform/issues/79","id":60752602,"number":79,"title":"Destructuring of params uses unbound temporary","user":{"login":"DmitrySoshnikov","id":244010,"avatar_url":"https://avatars.githubusercontent.com/u/244010?v=3","gravatar_id":"","url":"https://api.github.com/users/DmitrySoshnikov","html_url":"https://github.com/DmitrySoshnikov","followers_url":"https://api.github.com/users/DmitrySoshnikov/followers","following_url":"https://api.github.com/users/DmitrySoshnikov/following{/other_user}","gists_url":"https://api.github.com/users/DmitrySoshnikov/gists{/gist_id}","starred_url":"https://api.github.com/users/DmitrySoshnikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DmitrySoshnikov/subscriptions","organizations_url":"https://api.github.com/users/DmitrySoshnikov/orgs","repos_url":"https://api.github.com/users/DmitrySoshnikov/repos","events_url":"https://api.github.com/users/DmitrySoshnikov/events{/privacy}","received_events_url":"https://api.github.com/users/DmitrySoshnikov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-12T00:24:12Z","updated_at":"2015-03-12T03:53:35Z","closed_at":null,"body":"```\r\nerrors.sort(({message:[{path:a}]}, {message:[{path:b}]}) => a == b ? 0 : a > b ? -1 : +1);\r\n```\r\n\r\nGenerated:\r\n\r\n```\r\nerrors.sort(function($__0, $__1)  {\r\n  var\r\n    $__1 = $__0.message,\r\n    $__2 = $__1[0],\r\n    a = $__2.path,\r\n    $__4 = $__3.message,\r\n    $__5 = $__4[0],\r\n    b = $__5.path;\r\n    return a == b ? 0 : a > b ? -1 : +1;\r\n});\r\n```\r\n\r\nThere's no `$__3`."},"comment":{"url":"https://api.github.com/repos/facebook/jstransform/issues/comments/78419731","html_url":"https://github.com/facebook/jstransform/issues/79#issuecomment-78419731","issue_url":"https://api.github.com/repos/facebook/jstransform/issues/79","id":78419731,"user":{"login":"DmitrySoshnikov","id":244010,"avatar_url":"https://avatars.githubusercontent.com/u/244010?v=3","gravatar_id":"","url":"https://api.github.com/users/DmitrySoshnikov","html_url":"https://github.com/DmitrySoshnikov","followers_url":"https://api.github.com/users/DmitrySoshnikov/followers","following_url":"https://api.github.com/users/DmitrySoshnikov/following{/other_user}","gists_url":"https://api.github.com/users/DmitrySoshnikov/gists{/gist_id}","starred_url":"https://api.github.com/users/DmitrySoshnikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DmitrySoshnikov/subscriptions","organizations_url":"https://api.github.com/users/DmitrySoshnikov/orgs","repos_url":"https://api.github.com/users/DmitrySoshnikov/repos","events_url":"https://api.github.com/users/DmitrySoshnikov/events{/privacy}","received_events_url":"https://api.github.com/users/DmitrySoshnikov/received_events","type":"User","site_admin":false},"created_at":"2015-03-12T03:53:35Z","updated_at":"2015-03-12T03:53:35Z","body":"Yes, the second param should be `$__3`. The transform in case of params is pretty naive in this case (written by me BTW initially :P, although at that time we didn't have normal temp vars allocator), and just counts the number of structured params to determine the index.\r\n\r\nThe thing is, params and the body are traversed independently, and it's not known at params processing time how deep a pattern will go inside (i.e. how many temp vars it will need)."}}