mirror of
https://github.com/tc39/test262.git
synced 2025-07-16 10:34:44 +02:00
33 lines
693 B
Plaintext
33 lines
693 B
Plaintext
// Copyright (C) 2020 HyeockJin Kim. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
desc: >
|
|
Destructuring field can be a non-string computed property, i.e it
|
|
can be defined only at runtime. Rest operation needs to skip
|
|
these properties as well.
|
|
template: default
|
|
includes: [propertyHelper.js]
|
|
features: [object-rest]
|
|
---*/
|
|
|
|
//- setup
|
|
var a = 1.;
|
|
var b, rest;
|
|
//- elems
|
|
{[a]:b, ...rest}
|
|
//- vals
|
|
{[a]: 1.0, bar: 2 }
|
|
//- body
|
|
assert.sameValue(b, 1);
|
|
|
|
assert.sameValue(Object.getOwnPropertyDescriptor(rest, "1"), undefined);
|
|
|
|
verifyProperty(rest, "bar", {
|
|
value: 2,
|
|
enumerable: true,
|
|
writable: true,
|
|
configurable: true
|
|
});
|
|
|