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