Debian Codegraph @

js/src/tests/test262/language/expressions/class/static-init-await-binding.js

raw
1 // |reftest| error:SyntaxError
2 // Copyright (C) 2021 the V8 project authors. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 esid: sec-class-definitions-static-semantics-early-errors
6 description: The `await` keyword is disallowed as a BindingIdentifier
7 info: |
8 ClassStaticBlockBody : ClassStaticBlockStatementList
9
10 [...]
11 - It is a Syntax Error if ContainsAwait of ClassStaticBlockStatementList is true.
12 features: [class-static-block]
13 negative:
14 phase: parse
15 type: SyntaxError
16 ---*/
17
18 $DONOTEVALUATE();
19
20 class C {
21 static {
22 (class await {});
23 }
24 }