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