Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Arrow Functions with Rest Paramters, Not Working #25914

Closed
eblahm opened this issue Sep 3, 2015 · 4 comments
Closed

Arrow Functions with Rest Paramters, Not Working #25914

eblahm opened this issue Sep 3, 2015 · 4 comments

Comments

@eblahm
Copy link

eblahm commented Sep 3, 2015

$ iojs --version
v3.1.0
$ iojs --harmony_arrow_functions --harmony_rest_parameters -e "var restArrow = (...args) => console.dir(args); restArrow('a', 'b');"
[eval]:1
var restArrow = (...args) => console.dir(args); restArrow('a', 'b');
                 ^^^

SyntaxError: Unexpected token ...
    at Object.exports.runInThisContext (vm.js:53:16)
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:430:26)
    at node.js:566:27
    at doNTCallback0 (node.js:407:9)
    at process._tickCallback (node.js:336:13)
@eblahm
Copy link
Author

eblahm commented Sep 3, 2015

MDN docs for arrow functions say that rest parameters should be supported in Chrome 45.0

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions

// Rest parameters are supported
(param1, param2, ...rest) => { statements }

@eblahm
Copy link
Author

eblahm commented Sep 3, 2015

Based on testing in the Chrome 45.0 console, it doesn't work so... I guess a bug needs to be opened in v8 and MDN docs need to change.

@ChALkeR
Copy link
Member

ChALkeR commented Sep 3, 2015

From Readme (as seen on https://github.com/nodejs/node-v0.x-archive):

New issues and pull requests, for all branches, should be opened at nodejs/node.
New issues and pull requests opened here will automatically be rejected.

@ChALkeR ChALkeR closed this as completed Sep 3, 2015
@ChALkeR
Copy link
Member

ChALkeR commented Sep 3, 2015

Also see nodejs/node#1655.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants