-
Notifications
You must be signed in to change notification settings - Fork 787
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ES6: Spread Element (for function argument) #1169
Comments
Spread is not just allowed in function argument position, but also as an array initialiser element. [...a] |
As i see it, spread operator is not supported for the function calls. Arrays and fd are. |
So for the expression {
"type": "Program",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "a"
},
"arguments": [
{
"argument": {
"name": "b",
"type": "Identifier",
},
"type": "SpreadElement",
}
]
}
}
]
} |
@mikesherov @ariya could one of you confirm my proposal? |
@markelog Probably not. Much has changed since and master has diverged much vs the old harmony branch. |
Apparently spread element for array initializer has been done by @ikarienator as part of #1045. Thus, let's scope this only for function argument. |
Syntax:
To be written.
Spec:
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-array-initializer
Relevant AST interfaces (from https://github.com/estree/estree):
Early Errors:
The following early errors should be detected: (to be written)
Related Tasks:
The text was updated successfully, but these errors were encountered: