Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Function/internals/Call/class-ctor.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-ecmascript-function-objects-call-thisargument-argumentslist
5 es6id: 9.2.1
6 description: Error when invoking a class constructor
7 info: |
8 [...]
9 2. If F's [[FunctionKind]] internal slot is "classConstructor", throw a
10 TypeError exception.
11 features: [class]
12 ---*/
13
14 class C {}
15
16 assert.throws(TypeError, function() {
17 C();
18 });