aboutsummaryrefslogtreecommitdiffstats
path: root/src/dstr-assignment/array-rest-put-prop-ref.case
blob: fda1af6dc0065c6333a52af541f082e861e2ffe3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// 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);