Skip to content

Spread operator requries --es-staging in v5.3.0 #4366

Description

@elmigranto

Changelog and official ES6 Support page states that Spread operator is supported without any runtime flags by >= 5.x.x. However, I get SyntaxError while using it without --es-staging flag. For example:

$ node -e 'var f = function (...parts) {};'
[eval]:1
var f = function (...parts) {};
                  ^^^

SyntaxError: Unexpected token ...
    at Object.exports.runInThisContext (vm.js:53:16)
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:398:26)
    at node.js:592:27
    at nextTickCallbackWith0Args (node.js:433:9)
    at process._tickCallback (node.js:362:13)

I'm on OS X with node 5.3.0 installed via homebrew and its default config (AFAIK, it uses https://nodejs.org/dist/v5.3.0/node-v5.3.0.tar.gz), here's my process.versions:

{ http_parser: '2.6.0',
  node: '5.3.0',
  v8: '4.6.85.31',
  uv: '1.8.0',
  zlib: '1.2.8',
  ares: '1.10.1-DEV',
  icu: '56.1',
  modules: '47',
  openssl: '1.0.2e' }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidIssues and PRs that are invalid.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions