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