Debian Codegraph @

js/src/tests/test262/built-ins/Symbol/is-constructor.js

raw
1 // Copyright (C) 2020 Alexey Shvayka. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 esid: sec-symbol-constructor
5 description: >
6 Symbol is a constructor and has [[Construct]] internal method.
7 info: |
8 The Symbol constructor:
9 [...]
10 * may be used as the value of an extends clause of a class definition
11 but a super call to it will cause an exception.
12 [...]
13 * has a [[Prototype]] internal slot whose value is %Function.prototype%.
14 includes: [isConstructor.js]
15 features: [Symbol, Reflect.construct]
16 ---*/
17
18 assert(isConstructor(Symbol));
19 assert.sameValue(Object.getPrototypeOf(Symbol), Function.prototype);
20
21 reportCompare(0, 0);