Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/class/fields-privatename-constructor-err.js

raw
1 // Copyright (C) 2017 Valerie Young. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 description: Private class fields early error with StringValue "#constructor"
6 esid: sec-class-definitions-static-semantics-early-errors
7 features: [class, class-fields-private]
8 negative:
9 phase: parse
10 type: SyntaxError
11 info: |
12 ClassElementName : PrivateName;
13 It is a Syntax Error if StringValue of PrivateName is "#constructor".
14 ---*/
15
16
17 throw "Test262: This statement should not be evaluated.";
18
19 var C = class {
20 #constructor;
21 }