summaryrefslogtreecommitdiff
path: root/src/dstr-assignment/obj-rest-nested-obj.case
blob: 3acb69150d51564529b0be60ab95f1be5689876d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright (C) 2017 Caio Lima. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
desc: >
    When DestructuringAssignmentTarget is an object literal, it should be parsed
    parsed as a DestructuringAssignmentPattern and evaluated as a destructuring
    assignment.
template: default
esid: pending
features: [object-rest]
---*/

//- setup
var a, b, c, d, e;
//- elems
{a, b, ...{c, e}}
//- vals
{a: 1, b: 2, c: 3, d: 4, e: 5}
//- body
assert.sameValue(a, 1);
assert.sameValue(b, 2);
assert.sameValue(c, 3);
assert.sameValue(e, 5);
assert.sameValue(d, undefined);