gen-yield-as-label-identifier-escaped.js (870B)
1 // |reftest| error:SyntaxError 2 // This file was procedurally generated from the following sources: 3 // - src/generators/yield-as-label-identifier-escaped.case 4 // - src/generators/syntax/obj-method.template 5 /*--- 6 description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Generator method) 7 esid: prod-GeneratorMethod 8 features: [generators] 9 flags: [generated] 10 negative: 11 phase: parse 12 type: SyntaxError 13 info: | 14 14.4 Generator Function Definitions 15 16 GeneratorMethod[Yield, Await]: 17 * PropertyName[?Yield, ?Await] ( UniqueFormalParameters[+Yield, ~Await] ) { GeneratorBody } 18 19 20 LabelIdentifier : Identifier 21 22 It is a Syntax Error if this production has a [Yield] parameter and 23 StringValue of Identifier is "yield". 24 25 ---*/ 26 $DONOTEVALUATE(); 27 28 var obj = { 29 *method() { 30 yi\u0065ld: ; 31 } 32 };