Skip to content

Destructuring Assignment Parse Error - works in Chrome & Safari but not Node #11480

Closed

Description

@shanebdavis
  • Version: v6.9.5
  • Platform: Darwin Honor.local 16.4.0 Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64
  • Subsystem: parser

This source: a=b=1;((a + 1), {c} = b)

  • Works in Chrome 56.0.2924.87
  • Works in Safari 10.0.3 (12602.4.8)
  • Fails to parse in Node

Quick command-line test:

  • echo "a=b=1;((a + 1), {c} = b)" | node

These slight variations DO work in node:

  • a=b=1;((a), {c} = b)
  • a=b=1;((a + 1), ({c} = b))

Activity

  1. shanebdavis commented on Feb 21, 2017

    @shanebdavis
    Author

    It also works in: Babel 6.23.1

  2. addaleax commented on Feb 21, 2017

    @addaleax
    Member

    @shanebdavis Fwiw, it also works in Node 7.x, which means it was likely fixed during a V8 upgrade.

    /cc @nodejs/v8

  3. shanebdavis commented on Feb 21, 2017

    @shanebdavis
    Author

    @addaleax Thanks! That makes sense. I was wondering why it worked in Chrome and not Node.

    Is 6.x scheduled to get V8 updates?

  4. addaleax commented on Feb 21, 2017

    @addaleax
    Member

    Is 6.x scheduled to get V8 updates?

    Not regularly. I think the process for these cases is to look for which commit(s) in V8 fixed the problem, see if is feasible to apply them to the old V8 branch and then cherry-pick them back.

  5. added
    confirmed-bugIssues and PRs for confirmed bugs.
    and removed
    confirmed-bugIssues and PRs for confirmed bugs.
    on Feb 21, 2017
  6. Fishrock123 commented on Feb 21, 2017

    @Fishrock123
    Contributor

    Eh I suppose we can keep the label on it if backporting is at all viable.

  7. self-assigned this
    on Feb 21, 2017
  8. targos commented on Feb 21, 2017

    @targos
    Member

    I Identified v8/v8@dfb8d33 as the commit that fixes it using git bisect.

  9. targos commented on Feb 21, 2017

    @targos
    Member
  10. targos commented on Mar 8, 2017

    @targos
    Member

    Fixed by d0e934f

  11. removed their assignment
    on Mar 1, 2022
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

    confirmed-bugIssues and PRs for confirmed bugs.v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions