summaryrefslogtreecommitdiff
path: root/src/dstr-assignment/obj-id-init-evaluation.case
blob: c5892ff5366461ed928d92d65e9c51be94219254 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// 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 Initializer should only be evaluated if v is undefined.
template: default
es6id: 12.14.5.4
---*/

//- setup
var flag1 = false;
var flag2 = false;
var x, y;
//- elems
{ x = flag1 = true, y = flag2 = true }
//- vals
{ y: 1 }
//- body
assert.sameValue(flag1, true);
assert.sameValue(flag2, false);