Skip to content

error destructuring binding in function parameters #12003

Closed
@dimitriylol

Description

@dimitriylol
  • Version: v6.3.0
  • Platform: Linux 4.4.0-64-generic x86_64 GNU/Linux
  • Subsystem:

Such code fails in node, but works fine in chrome console:
const myConst = 'c';
const arr = [{ c: 10 }];
arr.every(({ [myConst]: n }) => n !== undefined)

Also, if you add one more statement with destructuring binding inside lambda, everything works fine.
const myConst = 'c';
const arr = [{ c: 10 }];
arr.every(({ [myConst]: n }) => n !== undefined);
arr.every((el) => {
const { [myConst]: num } = el;
return num !== undefined;
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateIssues and PRs that are duplicates of other issues or PRs.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