identifier-shorthand-static-init-await-valid.js (570B)
1 // Copyright (C) 2021 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-class-definitions-static-semantics-early-errors 5 description: The `await` keyword is interpreted as an identifier within the body of arrow functions 6 info: | 7 ClassStaticBlockBody : ClassStaticBlockStatementList 8 9 [...] 10 - It is a Syntax Error if ContainsAwait of ClassStaticBlockStatementList is true. 11 features: [class-static-block] 12 ---*/ 13 14 class C { 15 static { 16 (() => ({ await })); 17 } 18 } 19 20 reportCompare(0, 0);