test262/test/language/expressions/class/gen-method-static-yield-as-identifier-reference.js
Leo Balter b3092c61b6 Add generators flags for tests depending on generators features (#1259)
* Add missing generators feature flags

* Generate files

* Add generators flags

* fixup! Add generators flags
2017-10-04 16:12:34 -04:00

36 lines
986 B
JavaScript

// This file was procedurally generated from the following sources:
// - src/generators/yield-as-identifier-reference.case
// - src/generators/syntax/class-expr-static-method.template
/*---
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)
esid: prod-GeneratorMethod
features: [generators]
flags: [generated]
negative:
phase: early
type: SyntaxError
info: |
ClassElement :
static MethodDefinition
MethodDefinition :
GeneratorMethod
14.4 Generator Function Definitions
GeneratorMethod :
* PropertyName ( UniqueFormalParameters ) { GeneratorBody }
IdentifierReference : Identifier
It is a Syntax Error if this production has a [Yield] parameter and
StringValue of Identifier is "yield".
---*/
throw "Test262: This statement should not be evaluated.";
var C = class { static *gen() {
void yield;
}};