{"action":"created","issue":{"url":"https://api.github.com/repos/babel/babel/issues/2347","labels_url":"https://api.github.com/repos/babel/babel/issues/2347/labels{/name}","comments_url":"https://api.github.com/repos/babel/babel/issues/2347/comments","events_url":"https://api.github.com/repos/babel/babel/issues/2347/events","html_url":"https://github.com/babel/babel/issues/2347","id":105618311,"number":2347,"title":"bound class methods access constructor's arguments instead of their own","user":{"login":"constb","id":1006766,"avatar_url":"https://avatars.githubusercontent.com/u/1006766?v=3","gravatar_id":"","url":"https://api.github.com/users/constb","html_url":"https://github.com/constb","followers_url":"https://api.github.com/users/constb/followers","following_url":"https://api.github.com/users/constb/following{/other_user}","gists_url":"https://api.github.com/users/constb/gists{/gist_id}","starred_url":"https://api.github.com/users/constb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/constb/subscriptions","organizations_url":"https://api.github.com/users/constb/orgs","repos_url":"https://api.github.com/users/constb/repos","events_url":"https://api.github.com/users/constb/events{/privacy}","received_events_url":"https://api.github.com/users/constb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-09T15:13:05Z","updated_at":"2015-09-09T22:51:27Z","closed_at":null,"body":"if I create class property and assign in a bound function, in the generated code I can access particular arguments without problem, but if I try to access ``arguments`` it brings class constructor's ``arguments`` into the closure and they become ``arguments`` of the bound function.\r\n\r\nthis is what I'm trying to achieve\r\n\r\n```\r\nclass Foo extends Component {\r\n  \r\n  componentDidMount() {\r\n    $(document).on('click', this.onEvent);\r\n  }\r\n  \r\n  onEvent = (event) => {\r\n    console.log(event);\r\n    console.log(arguments);\r\n  };\r\n}\r\n```\r\n\r\nin ``onEvent`` the ``event`` argument will be a jquery event like expected. but ``arguments`` will not be method arguments but constructor arguments instead.\r\n\r\nthis [REPL](https://babeljs.io/repl/#?experimental=true&evaluate=true&loose=false&spec=false&code=class%20Foo%20%7B%0A%20%20%0A%20%20componentDidMount()%20%7B%0A%20%20%20%20%24(document).on('click'%2C%20this.onEvent)%3B%0A%20%20%7D%0A%20%20%0A%20%20onEvent%20%3D%20(event)%20%3D%3E%20%7B%0A%20%20%20%20console.log(event)%3B%0A%20%20%20%20console.log(arguments)%3B%0A%20%20%7D%3B%0A%7D) shows what code gets generated.\r\n\r\nnow, I may not know ES6 well enough to understand why is this happening. but I couldn't find any mention of such a \"feature\", so this might be a bug."},"comment":{"url":"https://api.github.com/repos/babel/babel/issues/comments/139066305","html_url":"https://github.com/babel/babel/issues/2347#issuecomment-139066305","issue_url":"https://api.github.com/repos/babel/babel/issues/2347","id":139066305,"user":{"login":"sebmck","id":853712,"avatar_url":"https://avatars.githubusercontent.com/u/853712?v=3","gravatar_id":"","url":"https://api.github.com/users/sebmck","html_url":"https://github.com/sebmck","followers_url":"https://api.github.com/users/sebmck/followers","following_url":"https://api.github.com/users/sebmck/following{/other_user}","gists_url":"https://api.github.com/users/sebmck/gists{/gist_id}","starred_url":"https://api.github.com/users/sebmck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebmck/subscriptions","organizations_url":"https://api.github.com/users/sebmck/orgs","repos_url":"https://api.github.com/users/sebmck/repos","events_url":"https://api.github.com/users/sebmck/events{/privacy}","received_events_url":"https://api.github.com/users/sebmck/received_events","type":"User","site_admin":false},"created_at":"2015-09-09T22:51:27Z","updated_at":"2015-09-09T22:51:27Z","body":"Great, thanks for the clarification @jeffmo!"}}