Debian Codegraph @

js/src/tests/test262/language/statements/function/static-init-await-binding-invalid.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: BindingIdentifier may not be `await` within class static blocks
7 info: |
8 BindingIdentifier : Identifier
9
10 [...]
11 - It is a Syntax Error if the code matched by this production is nested,
12 directly or indirectly (but not crossing function or static initialization
13 block boundaries), within a ClassStaticBlock and the StringValue of
14 Identifier is "await".
15 negative:
16 phase: parse
17 type: SyntaxError
18 features: [class-static-block]
19 ---*/
20
21 $DONOTEVALUATE();
22
23 class C {
24 static {
25 function await() {}
26 }
27 }
28