// Copyright (C) 2017 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 let 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); //- teardown promise .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) .then($DONE, $DONE);