blob: fda1af6dc0065c6333a52af541f082e861e2ffe3 [file] [log] [blame] [edit]
// 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);