static-init-invalid-arguments.js (616B)
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: Block cannot use `arguments` as an identifier 7 info: | 8 ClassStaticBlockBody : ClassStaticBlockStatementList 9 10 - It is a Syntax Error if ContainsArguments of ClassStaticBlockStatementList 11 is true. 12 negative: 13 phase: parse 14 type: SyntaxError 15 features: [class-static-block] 16 ---*/ 17 18 $DONOTEVALUATE(); 19 20 class C { 21 static { 22 (class { [argument\u0073]() {} }); 23 } 24 }