| 1 |
// Copyright (C) 2015 the V8 project authors. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
/*--- |
| 4 |
es6id: 26.1.4 |
| 5 |
description: > |
| 6 |
Delete a symbol property. |
| 7 |
info: | |
| 8 |
26.1.4 Reflect.deleteProperty ( target, propertyKey ) |
| 9 |
|
| 10 |
... |
| 11 |
2. Let key be ToPropertyKey(propertyKey). |
| 12 |
... |
| 13 |
|
| 14 |
7.1.14 ToPropertyKey ( argument ) |
| 15 |
|
| 16 |
... |
| 17 |
3. If Type(key) is Symbol, then |
| 18 |
a. Return key. |
| 19 |
... |
| 20 |
features: [Symbol] |
| 21 |
---*/ |
| 22 |
|
| 23 |
var s = Symbol('1'); |
| 24 |
var o = {}; |
| 25 |
o[s] = 42; |
| 26 |
|
| 27 |
Reflect.deleteProperty(o, s); |
| 28 |
|
| 29 |
assert.sameValue(o.hasOwnProperty(s), false); |
| 30 |
assert.sameValue(o[s], undefined); |