summaryrefslogtreecommitdiff
path: root/src/dstr-assignment/obj-prop-name-evaluation.case
blob: 2316d6d09c5f20b6fb8f45cf57040288335c4ff3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright (C) 2015 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
desc: >
    PropertyName of an AssignmentProperty may be a ComputedPropertyName.
template: default
es6id: 12.14.5.2
---*/

//- setup
var x, y, xy;
//- elems
{ ['x' + 'y']: x }
//- vals
{ x: 1, xy: 23, y: 2 }
//- body
assert.sameValue(x, 23);
assert.sameValue(y, undefined);
assert.sameValue(xy, undefined);