named-yield-as-label-identifier-escaped.js (854B)
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/expression-named.template 5 /*--- 6 description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Named generator expression) 7 esid: prod-GeneratorExpression 8 features: [generators] 9 flags: [generated] 10 negative: 11 phase: parse 12 type: SyntaxError 13 info: | 14 14.4 Generator Function Definitions 15 16 GeneratorExpression: 17 function * BindingIdentifier opt ( FormalParameters ) { 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 gen = function *g() { 29 yi\u0065ld: ; 30 };