Revision control

Copy as Markdown

// Copyright (C) 2015 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: >
The DestructuringAssignmentTarget of an AssignmentElement may be a
PropertyReference.
template: default
es6id: 12.14.5.3
---*/
//- setup
var x = {};
//- elems
[...x.y]
//- vals
[4, 3, 2]
//- body
assert.sameValue(x.y.length, 3);
assert.sameValue(x.y[0], 4);
assert.sameValue(x.y[1], 3);
assert.sameValue(x.y[2], 2);