async-await-as-identifier-reference-escaped.js (880B)
1 // |reftest| error:SyntaxError 2 // This file was procedurally generated from the following sources: 3 // - src/async-functions/await-as-identifier-reference-escaped.case 4 // - src/async-functions/syntax/async-obj-method.template 5 /*--- 6 description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async method) 7 esid: prod-AsyncMethod 8 features: [async-functions] 9 flags: [generated] 10 negative: 11 phase: parse 12 type: SyntaxError 13 info: | 14 Async Function Definitions 15 16 AsyncMethod : 17 async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody } 18 19 20 IdentifierReference : Identifier 21 22 It is a Syntax Error if this production has a [Await] parameter and 23 StringValue of Identifier is "await". 24 25 ---*/ 26 $DONOTEVALUATE(); 27 28 29 var obj = { 30 async method() { 31 void \u0061wait; 32 } 33 };