Skip to content

Destructuring of arrow function arguments via computed property throws in v6.x #10347

@oaleynik

Description

@oaleynik
  • node -v: v6.x
  • uname -a: Darwin Olegs-MacBook-Pro.local 16.4.0 Darwin Kernel Version 16.4.0: Wed Dec 7 12:06:26 PST 2016; root:xnu-3789.41.1~5/RELEASE_X86_64 x86_64
// Throws in Nodejs 6.x with -> ReferenceError: y is not defined
var y = 'a';
var g20 = ({[y]: x}) => { var y = 'b'; return x; };
require('assert').equal(1, g20({a: 1, b: 2}));

The test case is taken from: https://github.com/nodejs/node/blob/v6.x/deps/v8/test/mjsunit/es6/destructuring.js#L893

Metadata

Metadata

Assignees

Labels

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