{"action":"created","comment":{"url":"https://api.github.com/repos/babel/babel/pulls/comments/71234532","id":71234532,"diff_hunk":"@@ -0,0 +1,15 @@\n+const a = 1;\n+function rest(b = a, ...a) {","path":"packages/babel-plugin-transform-es2015-parameters/test/fixtures/parameters/default-rest/actual.js","position":2,"original_position":2,"commit_id":"94d92b3d6785d2e7aaecfc85e2c22efc9bddbb34","original_commit_id":"94d92b3d6785d2e7aaecfc85e2c22efc9bddbb34","user":{"login":"danez","id":231804,"avatar_url":"https://avatars.githubusercontent.com/u/231804?v=3","gravatar_id":"","url":"https://api.github.com/users/danez","html_url":"https://github.com/danez","followers_url":"https://api.github.com/users/danez/followers","following_url":"https://api.github.com/users/danez/following{/other_user}","gists_url":"https://api.github.com/users/danez/gists{/gist_id}","starred_url":"https://api.github.com/users/danez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danez/subscriptions","organizations_url":"https://api.github.com/users/danez/orgs","repos_url":"https://api.github.com/users/danez/repos","events_url":"https://api.github.com/users/danez/events{/privacy}","received_events_url":"https://api.github.com/users/danez/received_events","type":"User","site_admin":false},"body":"Hmm, that is weird especially that firefox returns `undefined`, because either I would expect the outer `a` or the inner one but not `undefined`.","created_at":"2016-07-18T21:33:50Z","updated_at":"2016-07-18T21:33:50Z","html_url":"https://github.com/babel/babel/pull/3572#discussion_r71234532","pull_request_url":"https://api.github.com/repos/babel/babel/pulls/3572","_links":{"self":{"href":"https://api.github.com/repos/babel/babel/pulls/comments/71234532"},"html":{"href":"https://github.com/babel/babel/pull/3572#discussion_r71234532"},"pull_request":{"href":"https://api.github.com/repos/babel/babel/pulls/3572"}}},"pull_request":{"url":"https://api.github.com/repos/babel/babel/pulls/3572","id":77065833,"html_url":"https://github.com/babel/babel/pull/3572","diff_url":"https://github.com/babel/babel/pull/3572.diff","patch_url":"https://github.com/babel/babel/pull/3572.patch","issue_url":"https://api.github.com/repos/babel/babel/issues/3572","number":3572,"state":"open","locked":false,"title":"Fix default parameter - rest parameter edge case","user":{"login":"jridgewell","id":112982,"avatar_url":"https://avatars.githubusercontent.com/u/112982?v=3","gravatar_id":"","url":"https://api.github.com/users/jridgewell","html_url":"https://github.com/jridgewell","followers_url":"https://api.github.com/users/jridgewell/followers","following_url":"https://api.github.com/users/jridgewell/following{/other_user}","gists_url":"https://api.github.com/users/jridgewell/gists{/gist_id}","starred_url":"https://api.github.com/users/jridgewell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jridgewell/subscriptions","organizations_url":"https://api.github.com/users/jridgewell/orgs","repos_url":"https://api.github.com/users/jridgewell/repos","events_url":"https://api.github.com/users/jridgewell/events{/privacy}","received_events_url":"https://api.github.com/users/jridgewell/received_events","type":"User","site_admin":false},"body":"When the rest parameter shared the same name as a default identifier\r\nfor a param, the loop would be hoisted outside the function!\r\n\r\n```js\r\nvar a = 1;\r\n\r\nfor (var _len = arguments.length, a = Array(_len > 1 ? _len - 1 : 0),\r\n_key = 1; _key < _len; _key++) {\r\n  a[_key - 1] = arguments[_key];\r\n}\r\n\r\nfunction foo2() {\r\n  var b = arguments.length <= 0 || arguments[0] === undefined ? a :\r\narguments[0];\r\n\r\n  assert.equal(b, 1);\r\n}\r\nfoo2(undefined, 2);\r\n```\r\n\r\nAnd if you tried to reference any index or `#length`, it’d blow up and\r\nrefuse to transpile.\r\n\r\n```\r\nUncaught Error: repl: Couldn't find intersection\r\n```","created_at":"2016-07-12T06:06:49Z","updated_at":"2016-07-18T21:33:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5362539898a6191cc566d392fc7769bffd063adc","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/babel/babel/pulls/3572/commits","review_comments_url":"https://api.github.com/repos/babel/babel/pulls/3572/comments","review_comment_url":"https://api.github.com/repos/babel/babel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/babel/babel/issues/3572/comments","statuses_url":"https://api.github.com/repos/babel/babel/statuses/94d92b3d6785d2e7aaecfc85e2c22efc9bddbb34","head":{"label":"jridgewell:default-parameter-rest-parameter","ref":"default-parameter-rest-parameter","sha":"94d92b3d6785d2e7aaecfc85e2c22efc9bddbb34","user":{"login":"jridgewell","id":112982,"avatar_url":"https://avatars.githubusercontent.com/u/112982?v=3","gravatar_id":"","url":"https://api.github.com/users/jridgewell","html_url":"https://github.com/jridgewell","followers_url":"https://api.github.com/users/jridgewell/followers","following_url":"https://api.github.com/users/jridgewell/following{/other_user}","gists_url":"https://api.github.com/users/jridgewell/gists{/gist_id}","starred_url":"https://api.github.com/users/jridgewell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jridgewell/subscriptions","organizations_url":"https://api.github.com/users/jridgewell/orgs","repos_url":"https://api.github.com/users/jridgewell/repos","events_url":"https://api.github.com/users/jridgewell/events{/privacy}","received_events_url":"https://api.github.com/users/jridgewell/received_events","type":"User","site_admin":false},"repo":{"id":43450298,"name":"babel","full_name":"jridgewell/babel","owner":{"login":"jridgewell","id":112982,"avatar_url":"https://avatars.githubusercontent.com/u/112982?v=3","gravatar_id":"","url":"https://api.github.com/users/jridgewell","html_url":"https://github.com/jridgewell","followers_url":"https://api.github.com/users/jridgewell/followers","following_url":"https://api.github.com/users/jridgewell/following{/other_user}","gists_url":"https://api.github.com/users/jridgewell/gists{/gist_id}","starred_url":"https://api.github.com/users/jridgewell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jridgewell/subscriptions","organizations_url":"https://api.github.com/users/jridgewell/orgs","repos_url":"https://api.github.com/users/jridgewell/repos","events_url":"https://api.github.com/users/jridgewell/events{/privacy}","received_events_url":"https://api.github.com/users/jridgewell/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jridgewell/babel","description":"Babel is a compiler for writing next generation JavaScript.","fork":true,"url":"https://api.github.com/repos/jridgewell/babel","forks_url":"https://api.github.com/repos/jridgewell/babel/forks","keys_url":"https://api.github.com/repos/jridgewell/babel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jridgewell/babel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jridgewell/babel/teams","hooks_url":"https://api.github.com/repos/jridgewell/babel/hooks","issue_events_url":"https://api.github.com/repos/jridgewell/babel/issues/events{/number}","events_url":"https://api.github.com/repos/jridgewell/babel/events","assignees_url":"https://api.github.com/repos/jridgewell/babel/assignees{/user}","branches_url":"https://api.github.com/repos/jridgewell/babel/branches{/branch}","tags_url":"https://api.github.com/repos/jridgewell/babel/tags","blobs_url":"https://api.github.com/repos/jridgewell/babel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jridgewell/babel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jridgewell/babel/git/refs{/sha}","trees_url":"https://api.github.com/repos/jridgewell/babel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jridgewell/babel/statuses/{sha}","languages_url":"https://api.github.com/repos/jridgewell/babel/languages","stargazers_url":"https://api.github.com/repos/jridgewell/babel/stargazers","contributors_url":"https://api.github.com/repos/jridgewell/babel/contributors","subscribers_url":"https://api.github.com/repos/jridgewell/babel/subscribers","subscription_url":"https://api.github.com/repos/jridgewell/babel/subscription","commits_url":"https://api.github.com/repos/jridgewell/babel/commits{/sha}","git_commits_url":"https://api.github.com/repos/jridgewell/babel/git/commits{/sha}","comments_url":"https://api.github.com/repos/jridgewell/babel/comments{/number}","issue_comment_url":"https://api.github.com/repos/jridgewell/babel/issues/comments{/number}","contents_url":"https://api.github.com/repos/jridgewell/babel/contents/{+path}","compare_url":"https://api.github.com/repos/jridgewell/babel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jridgewell/babel/merges","archive_url":"https://api.github.com/repos/jridgewell/babel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jridgewell/babel/downloads","issues_url":"https://api.github.com/repos/jridgewell/babel/issues{/number}","pulls_url":"https://api.github.com/repos/jridgewell/babel/pulls{/number}","milestones_url":"https://api.github.com/repos/jridgewell/babel/milestones{/number}","notifications_url":"https://api.github.com/repos/jridgewell/babel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jridgewell/babel/labels{/name}","releases_url":"https://api.github.com/repos/jridgewell/babel/releases{/id}","deployments_url":"https://api.github.com/repos/jridgewell/babel/deployments","created_at":"2015-09-30T18:12:49Z","updated_at":"2016-06-10T01:59:24Z","pushed_at":"2016-07-15T05:28:07Z","git_url":"git://github.com/jridgewell/babel.git","ssh_url":"git@github.com:jridgewell/babel.git","clone_url":"https://github.com/jridgewell/babel.git","svn_url":"https://github.com/jridgewell/babel","homepage":"https://babeljs.io/","size":14193,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"babel:master","ref":"master","sha":"57ef3ea8eb8b899e53263af2f63550704748c832","user":{"login":"babel","id":9637642,"avatar_url":"https://avatars.githubusercontent.com/u/9637642?v=3","gravatar_id":"","url":"https://api.github.com/users/babel","html_url":"https://github.com/babel","followers_url":"https://api.github.com/users/babel/followers","following_url":"https://api.github.com/users/babel/following{/other_user}","gists_url":"https://api.github.com/users/babel/gists{/gist_id}","starred_url":"https://api.github.com/users/babel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/babel/subscriptions","organizations_url":"https://api.github.com/users/babel/orgs","repos_url":"https://api.github.com/users/babel/repos","events_url":"https://api.github.com/users/babel/events{/privacy}","received_events_url":"https://api.github.com/users/babel/received_events","type":"Organization","site_admin":false},"repo":{"id":24560307,"name":"babel","full_name":"babel/babel","owner":{"login":"babel","id":9637642,"avatar_url":"https://avatars.githubusercontent.com/u/9637642?v=3","gravatar_id":"","url":"https://api.github.com/users/babel","html_url":"https://github.com/babel","followers_url":"https://api.github.com/users/babel/followers","following_url":"https://api.github.com/users/babel/following{/other_user}","gists_url":"https://api.github.com/users/babel/gists{/gist_id}","starred_url":"https://api.github.com/users/babel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/babel/subscriptions","organizations_url":"https://api.github.com/users/babel/orgs","repos_url":"https://api.github.com/users/babel/repos","events_url":"https://api.github.com/users/babel/events{/privacy}","received_events_url":"https://api.github.com/users/babel/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/babel/babel","description":":tropical_fish: Babel is a compiler for writing next generation JavaScript.","fork":false,"url":"https://api.github.com/repos/babel/babel","forks_url":"https://api.github.com/repos/babel/babel/forks","keys_url":"https://api.github.com/repos/babel/babel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/babel/babel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/babel/babel/teams","hooks_url":"https://api.github.com/repos/babel/babel/hooks","issue_events_url":"https://api.github.com/repos/babel/babel/issues/events{/number}","events_url":"https://api.github.com/repos/babel/babel/events","assignees_url":"https://api.github.com/repos/babel/babel/assignees{/user}","branches_url":"https://api.github.com/repos/babel/babel/branches{/branch}","tags_url":"https://api.github.com/repos/babel/babel/tags","blobs_url":"https://api.github.com/repos/babel/babel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/babel/babel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/babel/babel/git/refs{/sha}","trees_url":"https://api.github.com/repos/babel/babel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/babel/babel/statuses/{sha}","languages_url":"https://api.github.com/repos/babel/babel/languages","stargazers_url":"https://api.github.com/repos/babel/babel/stargazers","contributors_url":"https://api.github.com/repos/babel/babel/contributors","subscribers_url":"https://api.github.com/repos/babel/babel/subscribers","subscription_url":"https://api.github.com/repos/babel/babel/subscription","commits_url":"https://api.github.com/repos/babel/babel/commits{/sha}","git_commits_url":"https://api.github.com/repos/babel/babel/git/commits{/sha}","comments_url":"https://api.github.com/repos/babel/babel/comments{/number}","issue_comment_url":"https://api.github.com/repos/babel/babel/issues/comments{/number}","contents_url":"https://api.github.com/repos/babel/babel/contents/{+path}","compare_url":"https://api.github.com/repos/babel/babel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/babel/babel/merges","archive_url":"https://api.github.com/repos/babel/babel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/babel/babel/downloads","issues_url":"https://api.github.com/repos/babel/babel/issues{/number}","pulls_url":"https://api.github.com/repos/babel/babel/pulls{/number}","milestones_url":"https://api.github.com/repos/babel/babel/milestones{/number}","notifications_url":"https://api.github.com/repos/babel/babel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/babel/babel/labels{/name}","releases_url":"https://api.github.com/repos/babel/babel/releases{/id}","deployments_url":"https://api.github.com/repos/babel/babel/deployments","created_at":"2014-09-28T13:38:23Z","updated_at":"2016-07-18T21:01:31Z","pushed_at":"2016-07-18T15:04:00Z","git_url":"git://github.com/babel/babel.git","ssh_url":"git@github.com:babel/babel.git","clone_url":"https://github.com/babel/babel.git","svn_url":"https://github.com/babel/babel","homepage":"https://babeljs.io/","size":19150,"stargazers_count":16603,"watchers_count":16603,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1215,"mirror_url":null,"open_issues_count":223,"forks":1215,"open_issues":223,"watchers":16603,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/babel/babel/pulls/3572"},"html":{"href":"https://github.com/babel/babel/pull/3572"},"issue":{"href":"https://api.github.com/repos/babel/babel/issues/3572"},"comments":{"href":"https://api.github.com/repos/babel/babel/issues/3572/comments"},"review_comments":{"href":"https://api.github.com/repos/babel/babel/pulls/3572/comments"},"review_comment":{"href":"https://api.github.com/repos/babel/babel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/babel/babel/pulls/3572/commits"},"statuses":{"href":"https://api.github.com/repos/babel/babel/statuses/94d92b3d6785d2e7aaecfc85e2c22efc9bddbb34"}}}}
{"actor":{"display_login":"danez"}}