blob: 87dc665a6e1a9a0a27fe32932d490d9f13b23209 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// |reftest| error:SyntaxError
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions
description: The "Await" parsing context does not apply to the block's statement list
info: |
Syntax
[...]
ClassStaticBlockStatementList :
StatementList[~Yield, +Await, ~Return]opt
## 15.7.1 Static Semantics: Early Errors
ClassStaticBlockBody : ClassStaticBlockStatementList
- It is a Syntax Error if ContainsAwait of ClassStaticBlockStatementList is true.
negative:
phase: parse
type: SyntaxError
features: [class-static-block]
---*/
$DONOTEVALUATE();
async function f() {
class C {
static {
await 0;
}
}
}
|