blob: f20f31a3d2c8c5ba910942478f203977266e28f5 [file] [log] [blame] [edit]
// Copyright (C) 2015 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: >
If the DestructuringAssignmentTarget of an AssignmentElement is a
PropertyReference, it should not be evaluated.
template: default
es6id: 12.14.5.4
---*/
//- setup
var setValue;
var x = {
get y() {
throw new Test262Error('The property should not be accessed.');
},
set y(val) {
setValue = val;
}
};
//- elems
{ a: x.y }
//- vals
{ a: 23 }
//- body
assert.sameValue(setValue, 23);