mirror of
https://github.com/tc39/test262.git
synced 2025-07-16 10:34:44 +02:00
29 lines
570 B
Plaintext
29 lines
570 B
Plaintext
// 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 property, its value should be binded
|
|
as rest object.
|
|
template: default
|
|
esid: pending
|
|
includes: [propertyHelper.js]
|
|
features: [object-rest]
|
|
---*/
|
|
|
|
//- setup
|
|
var src = {};
|
|
//- elems
|
|
{...src.y}
|
|
//- vals
|
|
{ x: 1, y: 2}
|
|
//- body
|
|
assert.sameValue(src.y.x, 1);
|
|
assert.sameValue(src.y.y, 2);
|
|
|
|
verifyProperty(src, "y", {
|
|
enumerable: true,
|
|
writable: true,
|
|
configurable: true
|
|
});
|