Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Symbol/invoked-with-new.js

raw
1 // Copyright (C) 2016 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 esid: sec-symbol-constructor
5 es6id: 19.4.1
6 description: The Symbol constructor may not be invoked with `new`
7 info: |
8 1. If NewTarget is not undefined, throw a TypeError exception.
9 features: [Symbol]
10 ---*/
11
12 assert.throws(TypeError, function() {
13 new Symbol();
14 });
15
16 assert.throws(TypeError, function() {
17 new Symbol('1');
18 });