async-await-as-binding-identifier-escaped.js |
---
description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async method)
esid: prod-AsyncMethod
features: [async-functions]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Function Definitions
AsyncMethod :
async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
BindingIdentifier : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
--- |
872 |
async-await-as-binding-identifier.js |
---
description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async method)
esid: prod-AsyncMethod
features: [async-functions]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Function Definitions
AsyncMethod :
async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
BindingIdentifier : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
--- |
859 |
async-await-as-identifier-reference-escaped.js |
---
description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async method)
esid: prod-AsyncMethod
features: [async-functions]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Function Definitions
AsyncMethod :
async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
IdentifierReference : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
--- |
880 |
async-await-as-identifier-reference.js |
---
description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async method)
esid: prod-AsyncMethod
features: [async-functions]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Function Definitions
AsyncMethod :
async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
IdentifierReference : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
--- |
867 |
async-await-as-label-identifier-escaped.js |
---
description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async method)
esid: prod-AsyncMethod
features: [async-functions]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Function Definitions
AsyncMethod :
async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
LabelIdentifier : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
--- |
864 |
async-await-as-label-identifier.js |
---
description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async method)
esid: prod-AsyncMethod
features: [async-functions]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Function Definitions
AsyncMethod :
async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
LabelIdentifier : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
--- |
851 |
async-gen-await-as-binding-identifier-escaped.js |
---
description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
BindingIdentifier : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
--- |
915 |
async-gen-await-as-binding-identifier.js |
---
description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
BindingIdentifier : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
--- |
902 |
async-gen-await-as-identifier-reference-escaped.js |
---
description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
IdentifierReference : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
--- |
923 |
async-gen-await-as-identifier-reference.js |
---
description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
IdentifierReference : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
--- |
910 |
async-gen-await-as-label-identifier-escaped.js |
---
description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
LabelIdentifier : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
--- |
907 |
async-gen-await-as-label-identifier.js |
---
description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
LabelIdentifier : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
--- |
894 |
async-gen-meth-array-destructuring-param-strict-body.js |
---
description: ArrayBindingPattern and Use Strict Directive are not allowed to coexist for the same function. (async generator method)
esid: sec-asyncgenerator-definitions-propertydefinitionevaluation
features: [rest-parameters, async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters )
{ AsyncGeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this AsyncGeneratorMethod is strict mode code, let strict be true.
Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be ! AsyncGeneratorFunctionCreate(Method, UniqueFormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
13.3.3.4 Static Semantics: IsSimpleParameterList
BindingElement : BindingPattern
1. Return false.
14.1.2 Static Semantics: Early Errors
FunctionDeclaration : function BindingIdentifier ( FormalParameters ) { FunctionBody }
FunctionDeclaration : function ( FormalParameters ) { FunctionBody }
FunctionExpression : function BindingIdentifier ( FormalParameters ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of FormalParameters is false.
14.2.1 Static Semantics: Early Errors
ArrowFunction : ArrowParameters => ConciseBody
- It is a Syntax Error if ContainsUseStrict of ConciseBody is true and
IsSimpleParameterList of ArrowParameters is false.
14.3.1 Static Semantics: Early Errors
MethodDefinition : PropertyName ( UniqueFormalParameters ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
MethodDefinition : set PropertyName ( PropertySetParameterList ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of PropertySetParameterList is false.
14.4.1 Static Semantics: Early Errors
GeneratorMethod : * PropertyName ( UniqueFormalParameters ) { GeneratorBody }
- It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
GeneratorDeclaration : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
GeneratorDeclaration : function * ( FormalParameters ) { GeneratorBody }
GeneratorExpression : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
- It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
14.5.1 Static Semantics: Early Errors
AsyncGeneratorMethod : async * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
- It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
AsyncGeneratorDeclaration : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
AsyncGeneratorDeclaration : async function * ( FormalParameters ) { AsyncGeneratorBody }
AsyncGeneratorExpression : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
- It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
IsSimpleParameterList of FormalParameters is false.
14.7.1 Static Semantics: Early Errors
AsyncMethod : async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
- It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
AsyncFunctionDeclaration : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionDeclaration : async function ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionExpression : async function ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionExpression : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
- It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
IsSimpleParameterList of FormalParameters is false.
14.8.1 Static Semantics: Early Errors
AsyncArrowFunction : CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
- It is a Syntax Error if ContainsUseStrict of AsyncConciseBody is true and
IsSimpleParameterList of CoverCallExpressionAndAsyncArrowHead is false.
--- |
4996 |
async-gen-meth-dflt-params-abrupt.js |
---
description: Abrupt completion returned by evaluation of initializer (async generator method)
esid: sec-asyncgenerator-definitions-propertydefinitionevaluation
features: [default-parameters, async-iteration]
flags: [generated]
info: |
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters )
{ AsyncGeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this AsyncGeneratorMethod is strict mode code, let strict be true.
Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be ! AsyncGeneratorFunctionCreate(Method, UniqueFormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
1749 |
async-gen-meth-dflt-params-arg-val-not-undefined.js |
---
description: Use of initializer when argument value is not `undefined` (async generator method)
esid: sec-asyncgenerator-definitions-propertydefinitionevaluation
features: [default-parameters, async-iteration]
flags: [generated, async]
info: |
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters )
{ AsyncGeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this AsyncGeneratorMethod is strict mode code, let strict be true.
Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be ! AsyncGeneratorFunctionCreate(Method, UniqueFormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
[...]
23. Let iteratorRecord be Record {[[Iterator]]:
CreateListIterator(argumentsList), [[Done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
a. Perform ? IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
--- |
2667 |
async-gen-meth-dflt-params-arg-val-undefined.js |
---
description: Use of initializer when argument value is `undefined` (async generator method)
esid: sec-asyncgenerator-definitions-propertydefinitionevaluation
features: [default-parameters, async-iteration]
flags: [generated, async]
info: |
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters )
{ AsyncGeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this AsyncGeneratorMethod is strict mode code, let strict be true.
Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be ! AsyncGeneratorFunctionCreate(Method, UniqueFormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
[...]
23. Let iteratorRecord be Record {[[Iterator]]:
CreateListIterator(argumentsList), [[Done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
a. Perform ? IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
--- |
1930 |
async-gen-meth-dflt-params-duplicates.js |
---
description: It is a Syntax Error if BoundNames of FormalParameters contains any duplicate elements. (async generator method)
esid: sec-asyncgenerator-definitions-propertydefinitionevaluation
features: [default-parameters, async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters )
{ AsyncGeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this AsyncGeneratorMethod is strict mode code, let strict be true.
Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be ! AsyncGeneratorFunctionCreate(Method, UniqueFormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
14.1.2 Static Semantics: Early Errors
StrictFormalParameters : FormalParameters
- It is a Syntax Error if BoundNames of FormalParameters contains any
duplicate elements.
FormalParameters : FormalParameterList
- It is a Syntax Error if IsSimpleParameterList of FormalParameterList is
false and BoundNames of FormalParameterList contains any duplicate
elements.
--- |
1583 |
async-gen-meth-dflt-params-ref-later.js |
---
description: Referencing a parameter that occurs later in the ParameterList (async generator method)
esid: sec-asyncgenerator-definitions-propertydefinitionevaluation
features: [default-parameters, async-iteration]
flags: [generated]
info: |
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters )
{ AsyncGeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this AsyncGeneratorMethod is strict mode code, let strict be true.
Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be ! AsyncGeneratorFunctionCreate(Method, UniqueFormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
1732 |
async-gen-meth-dflt-params-ref-prior.js |
---
description: Referencing a parameter that occurs earlier in the ParameterList (async generator method)
esid: sec-asyncgenerator-definitions-propertydefinitionevaluation
features: [default-parameters, async-iteration]
flags: [generated, async]
info: |
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters )
{ AsyncGeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this AsyncGeneratorMethod is strict mode code, let strict be true.
Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be ! AsyncGeneratorFunctionCreate(Method, UniqueFormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
1963 |
async-gen-meth-dflt-params-ref-self.js |
---
description: Referencing a parameter from within its own initializer (async generator method)
esid: sec-asyncgenerator-definitions-propertydefinitionevaluation
features: [default-parameters, async-iteration]
flags: [generated]
info: |
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters )
{ AsyncGeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this AsyncGeneratorMethod is strict mode code, let strict be true.
Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be ! AsyncGeneratorFunctionCreate(Method, UniqueFormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
1721 |
async-gen-meth-dflt-params-rest.js |
---
description: RestParameter does not support an initializer (async generator method)
esid: sec-asyncgenerator-definitions-propertydefinitionevaluation
features: [default-parameters, async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters )
{ AsyncGeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this AsyncGeneratorMethod is strict mode code, let strict be true.
Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be ! AsyncGeneratorFunctionCreate(Method, UniqueFormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
14.1 Function Definitions
Syntax
FunctionRestParameter[Yield] :
BindingRestElement[?Yield]
13.3.3 Destructuring Binding Patterns
Syntax
BindingRestElement[Yield] :
...BindingIdentifier[?Yield]
...BindingPattern[?Yield]
--- |
1402 |
async-gen-meth-dflt-params-trailing-comma.js |
---
description: A trailing comma should not increase the respective length, using default parameters (async generator method)
esid: sec-asyncgenerator-definitions-propertydefinitionevaluation
features: [async-iteration]
flags: [generated, async]
info: |
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters )
{ AsyncGeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this AsyncGeneratorMethod is strict mode code, let strict be true.
Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be ! AsyncGeneratorFunctionCreate(Method, UniqueFormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
Trailing comma in the parameters list
14.1 Function Definitions
FormalParameters[Yield, Await] : FormalParameterList[?Yield, ?Await] ,
--- |
1629 |
async-gen-meth-escaped-async.js |
---
esid: sec-grammar-notation
description: >
The `async` contextual keyword must not contain Unicode escape sequences.
info: |
Terminal symbols are shown
in fixed width font, both in the productions of the grammars and throughout this
specification whenever the text directly refers to such a terminal symbol. These
are to appear in a script exactly as written. All terminal symbol code points
specified in this way are to be understood as the appropriate Unicode code points
from the Basic Latin range, as opposed to any similar-looking code points from
other Unicode ranges.
negative:
phase: parse
type: SyntaxError
features: [async-iteration]
--- |
886 |
async-gen-meth-eval-var-scope-syntax-err.js |
---
description: sloppy direct eval in params introduces var (async generator method in sloppy code)
esid: sec-asyncgenerator-definitions-propertydefinitionevaluation
features: [default-parameters, async-iteration]
flags: [generated, noStrict]
info: |
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters )
{ AsyncGeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this AsyncGeneratorMethod is strict mode code, let strict be true.
Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be ! AsyncGeneratorFunctionCreate(Method, UniqueFormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
Runtime Semantics: IteratorBindingInitialization
FormalParameter : BindingElement
1. Return the result of performing IteratorBindingInitialization for BindingElement with arguments iteratorRecord and environment.
--- |
1536 |
async-gen-meth-object-destructuring-param-strict-body.js |
---
description: ObjectBindingPattern and Use Strict Directive are not allowed to coexist for the same function. (async generator method)
esid: sec-asyncgenerator-definitions-propertydefinitionevaluation
features: [rest-parameters, async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters )
{ AsyncGeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this AsyncGeneratorMethod is strict mode code, let strict be true.
Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be ! AsyncGeneratorFunctionCreate(Method, UniqueFormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
13.3.3.4 Static Semantics: IsSimpleParameterList
BindingElement : BindingPattern
1. Return false.
14.1.2 Static Semantics: Early Errors
FunctionDeclaration : function BindingIdentifier ( FormalParameters ) { FunctionBody }
FunctionDeclaration : function ( FormalParameters ) { FunctionBody }
FunctionExpression : function BindingIdentifier ( FormalParameters ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of FormalParameters is false.
14.2.1 Static Semantics: Early Errors
ArrowFunction : ArrowParameters => ConciseBody
- It is a Syntax Error if ContainsUseStrict of ConciseBody is true and
IsSimpleParameterList of ArrowParameters is false.
14.3.1 Static Semantics: Early Errors
MethodDefinition : PropertyName ( UniqueFormalParameters ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
MethodDefinition : set PropertyName ( PropertySetParameterList ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of PropertySetParameterList is false.
14.4.1 Static Semantics: Early Errors
GeneratorMethod : * PropertyName ( UniqueFormalParameters ) { GeneratorBody }
- It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
GeneratorDeclaration : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
GeneratorDeclaration : function * ( FormalParameters ) { GeneratorBody }
GeneratorExpression : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
- It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
14.5.1 Static Semantics: Early Errors
AsyncGeneratorMethod : async * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
- It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
AsyncGeneratorDeclaration : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
AsyncGeneratorDeclaration : async function * ( FormalParameters ) { AsyncGeneratorBody }
AsyncGeneratorExpression : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
- It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
IsSimpleParameterList of FormalParameters is false.
14.7.1 Static Semantics: Early Errors
AsyncMethod : async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
- It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
AsyncFunctionDeclaration : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionDeclaration : async function ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionExpression : async function ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionExpression : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
- It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
IsSimpleParameterList of FormalParameters is false.
14.8.1 Static Semantics: Early Errors
AsyncArrowFunction : CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
- It is a Syntax Error if ContainsUseStrict of AsyncConciseBody is true and
IsSimpleParameterList of CoverCallExpressionAndAsyncArrowHead is false.
--- |
4999 |
async-gen-meth-params-trailing-comma-multiple.js |
---
description: A trailing comma should not increase the respective length, using multiple parameters (async generator method)
esid: sec-asyncgenerator-definitions-propertydefinitionevaluation
features: [async-iteration]
flags: [generated, async]
info: |
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters )
{ AsyncGeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this AsyncGeneratorMethod is strict mode code, let strict be true.
Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be ! AsyncGeneratorFunctionCreate(Method, UniqueFormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
Trailing comma in the parameters list
14.1 Function Definitions
FormalParameters[Yield, Await] : FormalParameterList[?Yield, ?Await] ,
--- |
1622 |
async-gen-meth-params-trailing-comma-single.js |
---
description: A trailing comma should not increase the respective length, using a single parameter (async generator method)
esid: sec-asyncgenerator-definitions-propertydefinitionevaluation
features: [async-iteration]
flags: [generated, async]
info: |
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters )
{ AsyncGeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this AsyncGeneratorMethod is strict mode code, let strict be true.
Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be ! AsyncGeneratorFunctionCreate(Method, UniqueFormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
Trailing comma in the parameters list
14.1 Function Definitions
FormalParameters[Yield, Await] : FormalParameterList[?Yield, ?Await] ,
--- |
1584 |
async-gen-meth-rest-param-strict-body.js |
---
description: RestParameter and Use Strict Directive are not allowed to coexist for the same function. (async generator method)
esid: sec-asyncgenerator-definitions-propertydefinitionevaluation
features: [rest-parameters, async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters )
{ AsyncGeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this AsyncGeneratorMethod is strict mode code, let strict be true.
Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be ! AsyncGeneratorFunctionCreate(Method, UniqueFormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
14.1.13 Static Semantics: IsSimpleParameterList
FormalParameters : FormalParameterList , FunctionRestParameter
1. Return false.
14.1.2 Static Semantics: Early Errors
FunctionDeclaration : function BindingIdentifier ( FormalParameters ) { FunctionBody }
FunctionDeclaration : function ( FormalParameters ) { FunctionBody }
FunctionExpression : function BindingIdentifier ( FormalParameters ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of FormalParameters is false.
14.2.1 Static Semantics: Early Errors
ArrowFunction : ArrowParameters => ConciseBody
- It is a Syntax Error if ContainsUseStrict of ConciseBody is true and
IsSimpleParameterList of ArrowParameters is false.
14.3.1 Static Semantics: Early Errors
MethodDefinition : PropertyName ( UniqueFormalParameters ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
MethodDefinition : set PropertyName ( PropertySetParameterList ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of PropertySetParameterList is false.
14.4.1 Static Semantics: Early Errors
GeneratorMethod : * PropertyName ( UniqueFormalParameters ) { GeneratorBody }
- It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
GeneratorDeclaration : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
GeneratorDeclaration : function * ( FormalParameters ) { GeneratorBody }
GeneratorExpression : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
- It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
14.5.1 Static Semantics: Early Errors
AsyncGeneratorMethod : async * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
- It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
AsyncGeneratorDeclaration : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
AsyncGeneratorDeclaration : async function * ( FormalParameters ) { AsyncGeneratorBody }
AsyncGeneratorExpression : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
- It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
IsSimpleParameterList of FormalParameters is false.
14.7.1 Static Semantics: Early Errors
AsyncMethod : async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
- It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
AsyncFunctionDeclaration : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionDeclaration : async function ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionExpression : async function ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionExpression : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
- It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
IsSimpleParameterList of FormalParameters is false.
14.8.1 Static Semantics: Early Errors
AsyncArrowFunction : CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
- It is a Syntax Error if ContainsUseStrict of AsyncConciseBody is true and
IsSimpleParameterList of CoverCallExpressionAndAsyncArrowHead is false.
--- |
5005 |
async-gen-meth-rest-params-trailing-comma-early-error.js |
---
description: It's a syntax error if a FunctionRestParameter is followed by a trailing comma (async generator method)
esid: sec-asyncgenerator-definitions-propertydefinitionevaluation
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters )
{ AsyncGeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this AsyncGeneratorMethod is strict mode code, let strict be true.
Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be ! AsyncGeneratorFunctionCreate(Method, UniqueFormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
Trailing comma in the parameters list
14.1 Function Definitions
FormalParameters[Yield, Await] :
[empty]
FunctionRestParameter[?Yield, ?Await]
FormalParameterList[?Yield, ?Await]
FormalParameterList[?Yield, ?Await] ,
FormalParameterList[?Yield, ?Await] , FunctionRestParameter[?Yield, ?Await]
--- |
1511 |
async-gen-yield-as-binding-identifier-escaped.js |
---
description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
BindingIdentifier : Identifier
It is a Syntax Error if this production has a [Yield] parameter and
StringValue of Identifier is "yield".
--- |
915 |
async-gen-yield-as-binding-identifier.js |
---
description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
BindingIdentifier : Identifier
It is a Syntax Error if this production has a [Yield] parameter and
StringValue of Identifier is "yield".
--- |
902 |
async-gen-yield-as-identifier-reference-escaped.js |
---
description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
IdentifierReference : Identifier
It is a Syntax Error if this production has a [Yield] parameter and
StringValue of Identifier is "yield".
--- |
923 |
async-gen-yield-as-identifier-reference.js |
---
description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
IdentifierReference : Identifier
It is a Syntax Error if this production has a [Yield] parameter and
StringValue of Identifier is "yield".
--- |
910 |
async-gen-yield-as-label-identifier-escaped.js |
---
description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
LabelIdentifier : Identifier
It is a Syntax Error if this production has a [Yield] parameter and
StringValue of Identifier is "yield".
--- |
907 |
async-gen-yield-as-label-identifier.js |
---
description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
LabelIdentifier : Identifier
It is a Syntax Error if this production has a [Yield] parameter and
StringValue of Identifier is "yield".
--- |
894 |
async-gen-yield-identifier-non-strict.js |
---
description: Use of yield as a valid identifier in a function body inside a generator body in non strict mode (Generator method - valid for non-strict only cases)
esid: prod-AsyncGeneratorMethod
features: [async-iteration]
flags: [generated, noStrict, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
--- |
1172 |
async-gen-yield-identifier-spread-non-strict.js |
---
description: Mixed use of object spread and yield as a valid identifier in a function body inside a generator body in non strict mode (Generator method - valid for non-strict only cases)
esid: prod-AsyncGeneratorMethod
features: [object-spread, Symbol, async-iteration]
flags: [generated, noStrict, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
Spread Properties
PropertyDefinition[Yield]:
(...)
...AssignmentExpression[In, ?Yield]
--- |
1747 |
async-gen-yield-identifier-spread-strict-strict.js |
---
description: It's an early error if the AssignmentExpression is a function body with yield as an identifier in strict mode. (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [object-spread, async-iteration]
flags: [generated, onlyStrict]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
Spread Properties
PropertyDefinition[Yield]:
(...)
...AssignmentExpression[In, ?Yield]
--- |
1119 |
async-gen-yield-identifier-strict-strict.js |
---
description: It's an early error if the generator body has another function body with yield as an identifier in strict mode. (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [async-iteration]
flags: [generated, onlyStrict]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
--- |
947 |
async-gen-yield-promise-reject-next-catch.js |
---
description: yield Promise.reject(value) is treated as throw value (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
--- |
1256 |
async-gen-yield-promise-reject-next-for-await-of-async-iterator.js |
---
description: yield * [Promise.reject(value)] is treated as throw value (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
--- |
1383 |
async-gen-yield-promise-reject-next-for-await-of-sync-iterator.js |
---
description: yield Promise.reject(value) in for-await-of is treated as throw value (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
--- |
1368 |
async-gen-yield-promise-reject-next-yield-star-async-iterator.js |
---
description: yield * (async iterator) is treated as throw value (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
--- |
1340 |
async-gen-yield-promise-reject-next-yield-star-sync-iterator.js |
---
description: yield * (async iterator) is treated as throw value (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
--- |
1304 |
async-gen-yield-promise-reject-next.js |
---
description: yield Promise.reject(value) is treated as throw value (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
--- |
1257 |
async-gen-yield-spread-arr-multiple.js |
---
description: Use yield value in a array spread position (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [async-iteration]
flags: [generated, async]
includes: [compareArray.js]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
Array Initializer
SpreadElement[Yield, Await]:
...AssignmentExpression[+In, ?Yield, ?Await]
--- |
1169 |
async-gen-yield-spread-arr-single.js |
---
description: Use yield value in a array spread position (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
Array Initializer
SpreadElement[Yield, Await]:
...AssignmentExpression[+In, ?Yield, ?Await]
--- |
1261 |
async-gen-yield-spread-obj.js |
---
description: Use yield value in a object spread position (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [object-spread, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
Spread Properties
PropertyDefinition[Yield]:
(...)
...AssignmentExpression[In, ?Yield]
--- |
1196 |
async-gen-yield-star-async-next.js |
---
description: Execution order for yield* with async iterator and next() (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, async-iteration, Symbol.asyncIterator]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
--- |
7200 |
async-gen-yield-star-async-return.js |
---
description: execution order for yield* with async iterator and return() (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [async-iteration, Symbol.asyncIterator]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
...
c. Else,
i. Assert: received.[[Type]] is return.
ii. Let return be ? GetMethod(iterator, "return").
iii. If return is undefined, return Completion(received).
iv. Let innerReturnResult be ? Call(return, iterator, « received.[[Value]] »).
v. If generatorKind is async, then set innerReturnResult to ? Await(innerReturnResult).
...
vii. Let done be ? IteratorComplete(innerReturnResult).
viii. If done is true, then
1. Let value be ? IteratorValue(innerReturnResult).
2. If generatorKind is async, then set value to ? Await(value).
3. Return Completion{[[Type]]: return, [[Value]]: value, [[Target]]: empty}.
ix. If generatorKind is async, then let received be AsyncGeneratorYield(? IteratorValue(innerResult)).
...
AsyncGeneratorYield ( value )
...
8. Return ! AsyncGeneratorResolve(generator, value, false).
...
--- |
7909 |
async-gen-yield-star-async-throw.js |
---
description: execution order for yield* with async iterator and throw() (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [async-iteration, Symbol.asyncIterator]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
...
b. Else if received.[[Type]] is throw, then
i. Let throw be ? GetMethod(iterator, "throw").
ii. If throw is not undefined, then
1. Let innerResult be ? Call(throw, iterator, « received.[[Value]] »).
2. If generatorKind is async, then set innerResult to ? Await(innerResult).
...
5. Let done be ? IteratorComplete(innerResult).
6. If done is true, then
a. Let resultValue be Return ? IteratorValue(innerResult).
b. If generatorKind is async, then set resultValue to ? Await(resultValue).
c. Return resultValue.
7. If generatorKind is async, then let received be AsyncGeneratorYield(? IteratorValue(innerResult)).
...
AsyncGeneratorYield ( value )
...
8. Return ! AsyncGeneratorResolve(generator, value, false).
...
--- |
7941 |
async-gen-yield-star-expr-abrupt.js |
---
description: Abrupt completion while getting yield* operand (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
...
--- |
1367 |
async-gen-yield-star-getiter-async-get-abrupt.js |
---
description: Abrupt completion while getting [Symbol.asyncIterator] (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
--- |
1874 |
async-gen-yield-star-getiter-async-not-callable-boolean-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.asyncIterator] (boolean) (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
2004 |
async-gen-yield-star-getiter-async-not-callable-number-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.asyncIterator] (number) (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
1998 |
async-gen-yield-star-getiter-async-not-callable-object-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.asyncIterator] (object) (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
1999 |
async-gen-yield-star-getiter-async-not-callable-string-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.asyncIterator] (string) (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
1999 |
async-gen-yield-star-getiter-async-not-callable-symbol-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.asyncIterator] (symbol) (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
2017 |
async-gen-yield-star-getiter-async-null-sync-get-abrupt.js |
---
description: Abrupt completion while getting @@iterator after null @@asyncIterator (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
--- |
2004 |
async-gen-yield-star-getiter-async-returns-abrupt.js |
---
description: Abrupt completion while calling [Symbol.asyncIterator] (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
6. Let iterator be ? Call(method, obj).
...
--- |
1852 |
async-gen-yield-star-getiter-async-returns-boolean-throw.js |
---
description: Non object returned by [Symbol.asyncIterator]() - boolean (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
6. Let iterator be ? Call(method, obj).
7. If Type(iterator) is not Object, throw a TypeError exception.
...
--- |
1924 |
async-gen-yield-star-getiter-async-returns-null-throw.js |
---
description: Non object returned by [Symbol.asyncIterator]() - null (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
6. Let iterator be ? Call(method, obj).
7. If Type(iterator) is not Object, throw a TypeError exception.
...
--- |
1918 |
async-gen-yield-star-getiter-async-returns-number-throw.js |
---
description: Non object returned by [Symbol.asyncIterator]() - number (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
6. Let iterator be ? Call(method, obj).
7. If Type(iterator) is not Object, throw a TypeError exception.
...
--- |
1920 |
async-gen-yield-star-getiter-async-returns-string-throw.js |
---
description: Non object returned by [Symbol.asyncIterator]() - string (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
6. Let iterator be ? Call(method, obj).
7. If Type(iterator) is not Object, throw a TypeError exception.
...
--- |
1922 |
async-gen-yield-star-getiter-async-returns-symbol-throw.js |
---
description: Non object returned by [Symbol.asyncIterator]() - symbol (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
6. Let iterator be ? Call(method, obj).
7. If Type(iterator) is not Object, throw a TypeError exception.
...
--- |
1938 |
async-gen-yield-star-getiter-async-returns-undefined-throw.js |
---
description: Non object returned by [Symbol.asyncIterator]() - undefined (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
6. Let iterator be ? Call(method, obj).
7. If Type(iterator) is not Object, throw a TypeError exception.
...
--- |
1933 |
async-gen-yield-star-getiter-async-undefined-sync-get-abrupt.js |
---
description: Abrupt completion while getting @@iterator after undefined @@asyncIterator (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
--- |
2019 |
async-gen-yield-star-getiter-sync-get-abrupt.js |
---
description: Abrupt completion while getting [Symbol.iterator] (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
--- |
1857 |
async-gen-yield-star-getiter-sync-not-callable-boolean-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.iterator] (boolean) (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
1911 |
async-gen-yield-star-getiter-sync-not-callable-number-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.iterator] (number) (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
1905 |
async-gen-yield-star-getiter-sync-not-callable-object-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.iterator] (object) (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
1906 |
async-gen-yield-star-getiter-sync-not-callable-string-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.iterator] (string) (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
1906 |
async-gen-yield-star-getiter-sync-not-callable-symbol-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.iterator] (symbol) (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
1941 |
async-gen-yield-star-getiter-sync-returns-abrupt.js |
---
description: Abrupt completion while calling [Symbol.iterator] (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
i. Let syncMethod be ? GetMethod(obj, @@iterator).
ii. Let syncIterator be ? Call(syncMethod, obj).
...
--- |
1807 |
async-gen-yield-star-getiter-sync-returns-boolean-throw.js |
---
description: Non object returned by [Symbol.iterator]() - boolean (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
i. Let syncMethod be ? GetMethod(obj, @@iterator).
ii. Let syncIterator be ? Call(syncMethod, obj).
iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
...
CreateAsyncFromSyncIterator(syncIterator)
1. If Type(syncIterator) is not Object, throw a TypeError exception.
...
--- |
1982 |
async-gen-yield-star-getiter-sync-returns-null-throw.js |
---
description: Non object returned by [Symbol.iterator]() - null (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
i. Let syncMethod be ? GetMethod(obj, @@iterator).
ii. Let syncIterator be ? Call(syncMethod, obj).
iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
...
CreateAsyncFromSyncIterator(syncIterator)
1. If Type(syncIterator) is not Object, throw a TypeError exception.
...
--- |
1976 |
async-gen-yield-star-getiter-sync-returns-number-throw.js |
---
description: Non object returned by [Symbol.iterator]() - number (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
i. Let syncMethod be ? GetMethod(obj, @@iterator).
ii. Let syncIterator be ? Call(syncMethod, obj).
iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
...
CreateAsyncFromSyncIterator(syncIterator)
1. If Type(syncIterator) is not Object, throw a TypeError exception.
...
--- |
1977 |
async-gen-yield-star-getiter-sync-returns-string-throw.js |
---
description: Non object returned by [Symbol.iterator]() - string (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
i. Let syncMethod be ? GetMethod(obj, @@iterator).
ii. Let syncIterator be ? Call(syncMethod, obj).
iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
...
CreateAsyncFromSyncIterator(syncIterator)
1. If Type(syncIterator) is not Object, throw a TypeError exception.
...
--- |
1978 |
async-gen-yield-star-getiter-sync-returns-symbol-throw.js |
---
description: Non object returned by [Symbol.iterator]() - symbol (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
i. Let syncMethod be ? GetMethod(obj, @@iterator).
ii. Let syncIterator be ? Call(syncMethod, obj).
iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
...
CreateAsyncFromSyncIterator(syncIterator)
1. If Type(syncIterator) is not Object, throw a TypeError exception.
...
--- |
1991 |
async-gen-yield-star-getiter-sync-returns-undefined-throw.js |
---
description: Non object returned by [Symbol.iterator]() - undefined (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
i. Let syncMethod be ? GetMethod(obj, @@iterator).
ii. Let syncIterator be ? Call(syncMethod, obj).
iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
...
CreateAsyncFromSyncIterator(syncIterator)
1. If Type(syncIterator) is not Object, throw a TypeError exception.
...
--- |
1991 |
async-gen-yield-star-next-call-done-get-abrupt.js |
---
description: Abrupt completion while getting done (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
...
v. Let done be ? IteratorComplete(innerResult).
...
--- |
1868 |
async-gen-yield-star-next-call-returns-abrupt.js |
---
description: Abrupt completion while calling next (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1633 |
async-gen-yield-star-next-call-value-get-abrupt.js |
---
description: Abrupt completion while getting value (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
...
vi. If done is true, then
1. Return ? IteratorValue(innerResult).
...
--- |
1922 |
async-gen-yield-star-next-get-abrupt.js |
---
description: Abrupt completion while getting next (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1628 |
async-gen-yield-star-next-non-object-ignores-then.js |
---
description: If next() value is not-object, do not access respective then property (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
iv. If Type(innerResult) is not Object, throw a TypeError exception.
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
7. If Type(resolution) is not Object, then
a. Return FulfillPromise(promise, resolution).
8. Let then be Get(resolution, "then").
...
--- |
2304 |
async-gen-yield-star-next-not-callable-boolean-throw.js |
---
description: Not-callable next value in a yield star position - boolean (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1628 |
async-gen-yield-star-next-not-callable-null-throw.js |
---
description: Not-callable next value in a yield star position - null (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1622 |
async-gen-yield-star-next-not-callable-number-throw.js |
---
description: Not-callable next value in a yield star position - number (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1624 |
async-gen-yield-star-next-not-callable-object-throw.js |
---
description: Not-callable next value in a yield star position - object (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1624 |
async-gen-yield-star-next-not-callable-string-throw.js |
---
description: Not-callable next value in a yield star position - string (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1624 |
async-gen-yield-star-next-not-callable-symbol-throw.js |
---
description: Not-callable next value in a yield star position - symbol (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1634 |
async-gen-yield-star-next-not-callable-undefined-throw.js |
---
description: Not-callable next value in a yield star position - undefined (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1637 |
async-gen-yield-star-next-then-get-abrupt.js |
---
description: Return abrupt after getting next().then (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
8. Let then be Get(resolution, "then").
...
10. Get thenAction be then.[[Value]].
...
12. Perform EnqueueJob("PromiseJobs", PromiseResolveThenableJob, « promise,
resolution, thenAction »).
...
--- |
2240 |
async-gen-yield-star-next-then-non-callable-boolean-fulfillpromise.js |
---
description: FulfillPromise if next().then is not-callable (boolean) (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
iv. If Type(innerResult) is not Object, throw a TypeError exception.
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
7. If Type(resolution) is not Object, then
a. Return FulfillPromise(promise, resolution).
8. Let then be Get(resolution, "then").
...
11. If IsCallable(thenAction) is false, then
a. Return FulfillPromise(promise, resolution).
...
--- |
2146 |
async-gen-yield-star-next-then-non-callable-null-fulfillpromise.js |
---
description: FulfillPromise if next().then is not-callable (null) (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
iv. If Type(innerResult) is not Object, throw a TypeError exception.
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
7. If Type(resolution) is not Object, then
a. Return FulfillPromise(promise, resolution).
8. Let then be Get(resolution, "then").
...
11. If IsCallable(thenAction) is false, then
a. Return FulfillPromise(promise, resolution).
...
--- |
2140 |
async-gen-yield-star-next-then-non-callable-number-fulfillpromise.js |
---
description: FulfillPromise if next().then is not-callable (number) (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
iv. If Type(innerResult) is not Object, throw a TypeError exception.
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
7. If Type(resolution) is not Object, then
a. Return FulfillPromise(promise, resolution).
8. Let then be Get(resolution, "then").
...
11. If IsCallable(thenAction) is false, then
a. Return FulfillPromise(promise, resolution).
...
--- |
2142 |
async-gen-yield-star-next-then-non-callable-object-fulfillpromise.js |
---
description: FulfillPromise if next().then is not-callable (object) (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
iv. If Type(innerResult) is not Object, throw a TypeError exception.
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
7. If Type(resolution) is not Object, then
a. Return FulfillPromise(promise, resolution).
8. Let then be Get(resolution, "then").
...
11. If IsCallable(thenAction) is false, then
a. Return FulfillPromise(promise, resolution).
...
--- |
2142 |
async-gen-yield-star-next-then-non-callable-string-fulfillpromise.js |
---
description: FulfillPromise if next().then is not-callable (string) (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
iv. If Type(innerResult) is not Object, throw a TypeError exception.
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
7. If Type(resolution) is not Object, then
a. Return FulfillPromise(promise, resolution).
8. Let then be Get(resolution, "then").
...
11. If IsCallable(thenAction) is false, then
a. Return FulfillPromise(promise, resolution).
...
--- |
2142 |
async-gen-yield-star-next-then-non-callable-symbol-fulfillpromise.js |
---
description: FulfillPromise if next().then is not-callable (symbol) (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
iv. If Type(innerResult) is not Object, throw a TypeError exception.
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
7. If Type(resolution) is not Object, then
a. Return FulfillPromise(promise, resolution).
8. Let then be Get(resolution, "then").
...
11. If IsCallable(thenAction) is false, then
a. Return FulfillPromise(promise, resolution).
...
--- |
2152 |
async-gen-yield-star-next-then-non-callable-undefined-fulfillpromise.js |
---
description: FulfillPromise if next().then is not-callable (undefined) (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
iv. If Type(innerResult) is not Object, throw a TypeError exception.
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
7. If Type(resolution) is not Object, then
a. Return FulfillPromise(promise, resolution).
8. Let then be Get(resolution, "then").
...
11. If IsCallable(thenAction) is false, then
a. Return FulfillPromise(promise, resolution).
...
--- |
2155 |
async-gen-yield-star-next-then-returns-abrupt.js |
---
description: Return abrupt after calling next().then (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
8. Let then be Get(resolution, "then").
...
10. Get thenAction be then.[[Value]].
...
12. Perform EnqueueJob("PromiseJobs", PromiseResolveThenableJob, « promise,
resolution, thenAction »).
...
--- |
2240 |
async-gen-yield-star-sync-next.js |
---
description: execution order for yield* with sync iterator and next() (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, async-iteration, Symbol.asyncIterator]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
5. Let received be NormalCompletion(undefined).
6. Repeat
a. If received.[[Type]] is normal, then
i. Let innerResult be ? IteratorNext(iterator, received.[[Value]]).
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
...
v. Let done be ? IteratorComplete(innerResult).
vi. If done is true, then
1. Return ? IteratorValue(innerResult).
vii. Let received be GeneratorYield(innerResult).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
ii. Let syncIterator be ? Call(syncMethod, obj).
iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
...
%AsyncFromSyncIteratorPrototype%.next ( value )
...
5. Let nextResult be IteratorNext(syncIterator, value).
...
7. Let nextValue be IteratorValue(nextResult).
...
9. Let nextDone be IteratorComplete(nextResult).
...
12. Perform ! Call(valueWrapperCapability.[[Resolve]], undefined,
« nextValue »).
...
14. Set onFulfilled.[[Done]] to nextDone.
15. Perform ! PerformPromiseThen(valueWrapperCapability.[[Promise]],
onFulfilled, undefined, promiseCapability).
...
Async Iterator Value Unwrap Functions
1. Return ! CreateIterResultObject(value, F.[[Done]]).
--- |
6807 |
async-gen-yield-star-sync-return.js |
---
description: execution order for yield* with sync iterator and return() (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, async-iteration, Symbol.asyncIterator]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
...
c. Else,
i. Assert: received.[[Type]] is return.
ii. Let return be ? GetMethod(iterator, "return").
iii. If return is undefined, return Completion(received).
iv. Let innerReturnResult be ? Call(return, iterator,
« received.[[Value]] »).
v. If generatorKind is async, then set innerReturnResult to
? Await(innerReturnResult).
...
vii. Let done be ? IteratorComplete(innerReturnResult).
viii. If done is true, then
1. Let value be ? IteratorValue(innerReturnResult).
2. Return Completion{[[Type]]: return, [[Value]]: value,
[[Target]]: empty}.
ix. Let received be GeneratorYield(innerResult).
%AsyncFromSyncIteratorPrototype%.return ( value )
5. Let return be GetMethod(syncIterator, "return").
...
...
8. Let returnResult be Call(return, syncIterator, « value »).
...
11. Let returnValue be IteratorValue(returnResult).
..
13. Let returnDone be IteratorComplete(returnResult).
...
16. Perform ! Call(valueWrapperCapability.[[Resolve]], undefined, « returnValue »).
...
18. Set onFulfilled.[[Done]] to returnDone.
19. Perform ! PerformPromiseThen(valueWrapperCapability.[[Promise]],
onFulfilled, undefined, promiseCapability).
...
--- |
6043 |
async-gen-yield-star-sync-throw.js |
---
description: execution order for yield* with sync iterator and throw() (Async generator method)
esid: prod-AsyncGeneratorMethod
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorMethod :
async [no LineTerminator here] * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
...
b. Else if received.[[Type]] is throw, then
i. Let throw be ? GetMethod(iterator, "throw").
ii. If throw is not undefined, then
1. Let innerResult be ? Call(throw, iterator, « received.[[Value]] »).
2. If generatorKind is async, then set innerResult to
? Await(innerResult).
...
5. Let done be ? IteratorComplete(innerResult).
6. If done is true, then
a. Return ? IteratorValue(innerResult).
7. Let received be GeneratorYield(innerResult).
...
%AsyncFromSyncIteratorPrototype%.throw ( value )
...
5. Let throw be GetMethod(syncIterator, "throw").
...
8. Let throwResult be Call(throw, syncIterator, « value »).
...
11. Let throwValue be IteratorValue(throwResult).
...
13. Let throwDone be IteratorComplete(throwResult).
...
16. Perform ! Call(valueWrapperCapability.[[Resolve]], undefined,
« throwValue »).
...
18. Set onFulfilled.[[Done]] to throwDone.
19. Perform ! PerformPromiseThen(valueWrapperCapability.[[Promise]],
onFulfilled, undefined, promiseCapability).
...
--- |
6013 |
async-meth-array-destructuring-param-strict-body.js |
---
description: ArrayBindingPattern and Use Strict Directive are not allowed to coexist for the same function. (async method)
esid: sec-async-function-definitions
features: [rest-parameters, async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
14.6 Async Function Definitions
AsyncMethod :
async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
13.3.3.4 Static Semantics: IsSimpleParameterList
BindingElement : BindingPattern
1. Return false.
14.1.2 Static Semantics: Early Errors
FunctionDeclaration : function BindingIdentifier ( FormalParameters ) { FunctionBody }
FunctionDeclaration : function ( FormalParameters ) { FunctionBody }
FunctionExpression : function BindingIdentifier ( FormalParameters ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of FormalParameters is false.
14.2.1 Static Semantics: Early Errors
ArrowFunction : ArrowParameters => ConciseBody
- It is a Syntax Error if ContainsUseStrict of ConciseBody is true and
IsSimpleParameterList of ArrowParameters is false.
14.3.1 Static Semantics: Early Errors
MethodDefinition : PropertyName ( UniqueFormalParameters ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
MethodDefinition : set PropertyName ( PropertySetParameterList ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of PropertySetParameterList is false.
14.4.1 Static Semantics: Early Errors
GeneratorMethod : * PropertyName ( UniqueFormalParameters ) { GeneratorBody }
- It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
GeneratorDeclaration : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
GeneratorDeclaration : function * ( FormalParameters ) { GeneratorBody }
GeneratorExpression : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
- It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
14.5.1 Static Semantics: Early Errors
AsyncGeneratorMethod : async * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
- It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
AsyncGeneratorDeclaration : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
AsyncGeneratorDeclaration : async function * ( FormalParameters ) { AsyncGeneratorBody }
AsyncGeneratorExpression : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
- It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
IsSimpleParameterList of FormalParameters is false.
14.7.1 Static Semantics: Early Errors
AsyncMethod : async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
- It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
AsyncFunctionDeclaration : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionDeclaration : async function ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionExpression : async function ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionExpression : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
- It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
IsSimpleParameterList of FormalParameters is false.
14.8.1 Static Semantics: Early Errors
AsyncArrowFunction : CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
- It is a Syntax Error if ContainsUseStrict of AsyncConciseBody is true and
IsSimpleParameterList of CoverCallExpressionAndAsyncArrowHead is false.
--- |
4497 |
async-meth-dflt-params-abrupt.js |
---
description: Abrupt completion returned by evaluation of initializer (async method)
esid: sec-async-function-definitions
features: [default-parameters, async-functions]
flags: [generated, async]
info: |
14.6 Async Function Definitions
AsyncMethod :
async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
1400 |
async-meth-dflt-params-arg-val-not-undefined.js |
---
description: Use of initializer when argument value is not `undefined` (async method)
esid: sec-async-function-definitions
features: [default-parameters, async-functions]
flags: [generated, async]
info: |
14.6 Async Function Definitions
AsyncMethod :
async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
[...]
23. Let iteratorRecord be Record {[[Iterator]]:
CreateListIterator(argumentsList), [[Done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
a. Perform ? IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
--- |
2161 |
async-meth-dflt-params-arg-val-undefined.js |
---
description: Use of initializer when argument value is `undefined` (async method)
esid: sec-async-function-definitions
features: [default-parameters, async-functions]
flags: [generated, async]
info: |
14.6 Async Function Definitions
AsyncMethod :
async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
[...]
23. Let iteratorRecord be Record {[[Iterator]]:
CreateListIterator(argumentsList), [[Done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
a. Perform ? IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
--- |
1424 |
async-meth-dflt-params-duplicates.js |
---
description: It is a Syntax Error if BoundNames of FormalParameters contains any duplicate elements. (async method)
esid: sec-async-function-definitions
features: [default-parameters, async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
14.6 Async Function Definitions
AsyncMethod :
async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
14.1.2 Static Semantics: Early Errors
StrictFormalParameters : FormalParameters
- It is a Syntax Error if BoundNames of FormalParameters contains any
duplicate elements.
FormalParameters : FormalParameterList
- It is a Syntax Error if IsSimpleParameterList of FormalParameterList is
false and BoundNames of FormalParameterList contains any duplicate
elements.
--- |
1084 |
async-meth-dflt-params-ref-later.js |
---
description: Referencing a parameter that occurs later in the ParameterList (async method)
esid: sec-async-function-definitions
features: [default-parameters, async-functions]
flags: [generated, async]
info: |
14.6 Async Function Definitions
AsyncMethod :
async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
1383 |
async-meth-dflt-params-ref-prior.js |
---
description: Referencing a parameter that occurs earlier in the ParameterList (async method)
esid: sec-async-function-definitions
features: [default-parameters, async-functions]
flags: [generated, async]
info: |
14.6 Async Function Definitions
AsyncMethod :
async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
1457 |
async-meth-dflt-params-ref-self.js |
---
description: Referencing a parameter from within its own initializer (async method)
esid: sec-async-function-definitions
features: [default-parameters, async-functions]
flags: [generated, async]
info: |
14.6 Async Function Definitions
AsyncMethod :
async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
1372 |
async-meth-dflt-params-rest.js |
---
description: RestParameter does not support an initializer (async method)
esid: sec-async-function-definitions
features: [default-parameters, async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
14.6 Async Function Definitions
AsyncMethod :
async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
14.1 Function Definitions
Syntax
FunctionRestParameter[Yield] :
BindingRestElement[?Yield]
13.3.3 Destructuring Binding Patterns
Syntax
BindingRestElement[Yield] :
...BindingIdentifier[?Yield]
...BindingPattern[?Yield]
--- |
903 |
async-meth-dflt-params-trailing-comma.js |
---
description: A trailing comma should not increase the respective length, using default parameters (async method)
esid: sec-async-function-definitions
features: [async-functions]
flags: [generated, async]
info: |
14.6 Async Function Definitions
AsyncMethod :
async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
Trailing comma in the parameters list
14.1 Function Definitions
FormalParameters[Yield, Await] : FormalParameterList[?Yield, ?Await] ,
--- |
1123 |
async-meth-escaped-async.js |
---
esid: sec-grammar-notation
description: >
The `async` contextual keyword must not contain Unicode escape sequences.
info: |
Terminal symbols are shown
in fixed width font, both in the productions of the grammars and throughout this
specification whenever the text directly refers to such a terminal symbol. These
are to appear in a script exactly as written. All terminal symbol code points
specified in this way are to be understood as the appropriate Unicode code points
from the Basic Latin range, as opposed to any similar-looking code points from
other Unicode ranges.
negative:
phase: parse
type: SyntaxError
features: [async-functions]
--- |
885 |
async-meth-eval-var-scope-syntax-err.js |
---
description: sloppy direct eval in params introduces var (async method in sloppy code)
esid: sec-async-function-definitions
features: [default-parameters, async-functions]
flags: [generated, async, noStrict]
info: |
14.6 Async Function Definitions
AsyncMethod :
async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
Runtime Semantics: IteratorBindingInitialization
FormalParameter : BindingElement
1. Return the result of performing IteratorBindingInitialization for BindingElement with arguments iteratorRecord and environment.
--- |
1187 |
async-meth-object-destructuring-param-strict-body.js |
---
description: ObjectBindingPattern and Use Strict Directive are not allowed to coexist for the same function. (async method)
esid: sec-async-function-definitions
features: [rest-parameters, async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
14.6 Async Function Definitions
AsyncMethod :
async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
13.3.3.4 Static Semantics: IsSimpleParameterList
BindingElement : BindingPattern
1. Return false.
14.1.2 Static Semantics: Early Errors
FunctionDeclaration : function BindingIdentifier ( FormalParameters ) { FunctionBody }
FunctionDeclaration : function ( FormalParameters ) { FunctionBody }
FunctionExpression : function BindingIdentifier ( FormalParameters ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of FormalParameters is false.
14.2.1 Static Semantics: Early Errors
ArrowFunction : ArrowParameters => ConciseBody
- It is a Syntax Error if ContainsUseStrict of ConciseBody is true and
IsSimpleParameterList of ArrowParameters is false.
14.3.1 Static Semantics: Early Errors
MethodDefinition : PropertyName ( UniqueFormalParameters ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
MethodDefinition : set PropertyName ( PropertySetParameterList ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of PropertySetParameterList is false.
14.4.1 Static Semantics: Early Errors
GeneratorMethod : * PropertyName ( UniqueFormalParameters ) { GeneratorBody }
- It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
GeneratorDeclaration : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
GeneratorDeclaration : function * ( FormalParameters ) { GeneratorBody }
GeneratorExpression : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
- It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
14.5.1 Static Semantics: Early Errors
AsyncGeneratorMethod : async * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
- It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
AsyncGeneratorDeclaration : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
AsyncGeneratorDeclaration : async function * ( FormalParameters ) { AsyncGeneratorBody }
AsyncGeneratorExpression : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
- It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
IsSimpleParameterList of FormalParameters is false.
14.7.1 Static Semantics: Early Errors
AsyncMethod : async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
- It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
AsyncFunctionDeclaration : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionDeclaration : async function ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionExpression : async function ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionExpression : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
- It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
IsSimpleParameterList of FormalParameters is false.
14.8.1 Static Semantics: Early Errors
AsyncArrowFunction : CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
- It is a Syntax Error if ContainsUseStrict of AsyncConciseBody is true and
IsSimpleParameterList of CoverCallExpressionAndAsyncArrowHead is false.
--- |
4500 |
async-meth-params-trailing-comma-multiple.js |
---
description: A trailing comma should not increase the respective length, using multiple parameters (async method)
esid: sec-async-function-definitions
features: [async-functions]
flags: [generated, async]
info: |
14.6 Async Function Definitions
AsyncMethod :
async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
Trailing comma in the parameters list
14.1 Function Definitions
FormalParameters[Yield, Await] : FormalParameterList[?Yield, ?Await] ,
--- |
1116 |
async-meth-params-trailing-comma-single.js |
---
description: A trailing comma should not increase the respective length, using a single parameter (async method)
esid: sec-async-function-definitions
features: [async-functions]
flags: [generated, async]
info: |
14.6 Async Function Definitions
AsyncMethod :
async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
Trailing comma in the parameters list
14.1 Function Definitions
FormalParameters[Yield, Await] : FormalParameterList[?Yield, ?Await] ,
--- |
1078 |
async-meth-rest-param-strict-body.js |
---
description: RestParameter and Use Strict Directive are not allowed to coexist for the same function. (async method)
esid: sec-async-function-definitions
features: [rest-parameters, async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
14.6 Async Function Definitions
AsyncMethod :
async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
14.1.13 Static Semantics: IsSimpleParameterList
FormalParameters : FormalParameterList , FunctionRestParameter
1. Return false.
14.1.2 Static Semantics: Early Errors
FunctionDeclaration : function BindingIdentifier ( FormalParameters ) { FunctionBody }
FunctionDeclaration : function ( FormalParameters ) { FunctionBody }
FunctionExpression : function BindingIdentifier ( FormalParameters ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of FormalParameters is false.
14.2.1 Static Semantics: Early Errors
ArrowFunction : ArrowParameters => ConciseBody
- It is a Syntax Error if ContainsUseStrict of ConciseBody is true and
IsSimpleParameterList of ArrowParameters is false.
14.3.1 Static Semantics: Early Errors
MethodDefinition : PropertyName ( UniqueFormalParameters ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
MethodDefinition : set PropertyName ( PropertySetParameterList ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of PropertySetParameterList is false.
14.4.1 Static Semantics: Early Errors
GeneratorMethod : * PropertyName ( UniqueFormalParameters ) { GeneratorBody }
- It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
GeneratorDeclaration : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
GeneratorDeclaration : function * ( FormalParameters ) { GeneratorBody }
GeneratorExpression : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
- It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
14.5.1 Static Semantics: Early Errors
AsyncGeneratorMethod : async * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
- It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
AsyncGeneratorDeclaration : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
AsyncGeneratorDeclaration : async function * ( FormalParameters ) { AsyncGeneratorBody }
AsyncGeneratorExpression : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
- It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
IsSimpleParameterList of FormalParameters is false.
14.7.1 Static Semantics: Early Errors
AsyncMethod : async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
- It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
AsyncFunctionDeclaration : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionDeclaration : async function ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionExpression : async function ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionExpression : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
- It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
IsSimpleParameterList of FormalParameters is false.
14.8.1 Static Semantics: Early Errors
AsyncArrowFunction : CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
- It is a Syntax Error if ContainsUseStrict of AsyncConciseBody is true and
IsSimpleParameterList of CoverCallExpressionAndAsyncArrowHead is false.
--- |
4506 |
async-meth-rest-params-trailing-comma-early-error.js |
---
description: It's a syntax error if a FunctionRestParameter is followed by a trailing comma (async method)
esid: sec-async-function-definitions
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
14.6 Async Function Definitions
AsyncMethod :
async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
Trailing comma in the parameters list
14.1 Function Definitions
FormalParameters[Yield, Await] :
[empty]
FunctionRestParameter[?Yield, ?Await]
FormalParameterList[?Yield, ?Await]
FormalParameterList[?Yield, ?Await] ,
FormalParameterList[?Yield, ?Await] , FunctionRestParameter[?Yield, ?Await]
--- |
1012 |
async-returns-async-arrow-returns-arguments-from-parent-function.js |
---
description: Async function returns an async function. (Async method)
esid: prod-AsyncMethod
features: [async-functions]
flags: [generated, async]
info: |
Async Function Definitions
AsyncMethod :
async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
--- |
917 |
async-returns-async-arrow-returns-newtarget.js |
---
description: Async function returns an async function. (Async method)
esid: prod-AsyncMethod
features: [async-functions]
flags: [generated, async]
info: |
Async Function Definitions
AsyncMethod :
async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
--- |
871 |
async-returns-async-arrow.js |
---
description: Async function returns an async function. (Async method)
esid: prod-AsyncMethod
features: [async-functions]
flags: [generated, async]
info: |
Async Function Definitions
AsyncMethod :
async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
--- |
837 |
async-returns-async-function-returns-arguments-from-own-function.js |
---
description: Async function returns an async function. (Async method)
esid: prod-AsyncMethod
features: [async-functions]
flags: [generated, async]
info: |
Async Function Definitions
AsyncMethod :
async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
--- |
936 |
async-returns-async-function-returns-newtarget.js |
---
description: Async function returns an async function. (Async method)
esid: prod-AsyncMethod
features: [async-functions]
flags: [generated, async]
info: |
Async Function Definitions
AsyncMethod :
async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
--- |
892 |
async-returns-async-function.js |
---
description: Async function returns an async function. (Async method)
esid: prod-AsyncMethod
features: [async-functions]
flags: [generated, async]
info: |
Async Function Definitions
AsyncMethod :
async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
--- |
857 |
async-super-call-body.js |
---
author: Brian Terlson <brian.terlson@microsoft.com>
esid: pending
description: >
Super calls work in body of async methods
flags: [async]
--- |
526 |
async-super-call-param.js |
---
author: Brian Terlson <brian.terlson@microsoft.com>
esid: pending
description: >
Super calls work in parameter list of async methods
flags: [async]
--- |
542 |
browser.js |
|
0 |
computed-property-name-yield-expression.js |
---
description: >
When the `yield` keyword occurs within the PropertyName of a
non-generator MethodDefinition within a generator function, it behaves as a
YieldExpression.
info: |
ComputedPropertyName:
[ AssignmentExpression ]
AssignmentExpression[In, Yield, Await]:
[+Yield]YieldExpression[?In, ?Await]
features: [computed-property-names, generators]
flags: [noStrict]
--- |
858 |
early-errors-object-async-method-duplicate-parameters.js |
---
author: Brian Terlson <brian.terlson@microsoft.com>
esid: sec-async-function-definitions
description: Formal parameters may not contain duplicates
info: |
# 14.7 Async Function Definitions
AsyncMethod[Yield, Await]:
async[no LineTerminator here]PropertyName[?Yield, ?Await](UniqueFormalParameters[~Yield, +Await]){AsyncFunctionBody}
# 14.1.2 Static Semantics: Early Errors
UniqueFormalParameters:FormalParameters
- It is a Syntax Error if BoundNames of FormalParameters contains any
duplicate elements.
negative:
phase: parse
type: SyntaxError
--- |
789 |
early-errors-object-method-arguments-in-formal-parameters-strict.js |
---
author: Brian Terlson <brian.terlson@microsoft.com>
esid: pending
description: It is a SyntaxError if FormalParameters contains arguments
negative:
phase: parse
type: SyntaxError
flags: [onlyStrict]
features: [async-functions]
--- |
468 |
early-errors-object-method-async-lineterminator.js |
---
esid: prod-AsyncMethod
description: async methods cannot have a line terminator between "async" and the property name
info: |
14.6 Async Function Definitions
AsyncMethod:
async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
negative:
phase: parse
type: SyntaxError
--- |
543 |
early-errors-object-method-await-in-formals-default.js |
---
author: Brian Terlson <brian.terlson@microsoft.com>
esid: pending
description: It is a SyntaxError if FormalParameters' default expressions contains await
negative:
phase: parse
type: SyntaxError
features: [async-functions]
--- |
453 |
early-errors-object-method-await-in-formals.js |
---
author: Brian Terlson <brian.terlson@microsoft.com>
esid: pending
description: It is a SyntaxError if FormalParameters contains await
negative:
phase: parse
type: SyntaxError
features: [async-functions]
--- |
427 |
early-errors-object-method-body-contains-super-call.js |
---
author: Brian Terlson <brian.terlson@microsoft.com>
esid: pending
description: It is a SyntaxError if AsyncFunctionBody contains SuperCall is true
negative:
phase: parse
type: SyntaxError
features: [async-functions]
--- |
442 |
early-errors-object-method-duplicate-parameters.js |
---
esid: sec-method-definitions
description: Formal parameters may not contain duplicates
info: |
# 14.3 Method Definitions
MethodDefinition[Yield, Await]:
PropertyName[?Yield, ?Await](UniqueFormalParameters[~Yield, ~Await]){FunctionBody[~Yield, ~Await]}
# 14.1.2 Static Semantics: Early Errors
UniqueFormalParameters:FormalParameters
- It is a Syntax Error if BoundNames of FormalParameters contains any
duplicate elements.
negative:
phase: parse
type: SyntaxError
--- |
698 |
early-errors-object-method-eval-in-formal-parameters-strict.js |
---
author: Brian Terlson <brian.terlson@microsoft.com>
esid: pending
description: It is a SyntaxError if FormalParameters contains eval in strict mode
negative:
phase: parse
type: SyntaxError
flags: [onlyStrict]
features: [async-functions]
--- |
472 |
early-errors-object-method-formals-body-duplicate.js |
---
author: Brian Terlson <brian.terlson@microsoft.com>
esid: pending
description: It is a SyntaxError if BoundNames of FormalParameters also occurs in the LexicallyDeclaredNames of AsyncFunctionBody
negative:
phase: parse
type: SyntaxError
features: [async-functions]
--- |
504 |
early-errors-object-method-formals-contains-super-call.js |
---
author: Brian Terlson <brian.terlson@microsoft.com>
esid: pending
description: It is a syntax error if FormalParameters contains SuperCall is true
negative:
phase: parse
type: SyntaxError
--- |
418 |
early-errors-object-method-NSPL-with-USD.js |
---
author: Brian Terlson <brian.terlson@microsoft.com>
esid: pending
description: >
It is a Syntax Error if ContainsUseStrict of AsyncConciseBody is *true* and IsSimpleParameterList of ArrowParameters is *false*.
negative:
phase: parse
type: SyntaxError
--- |
481 |
escaped-get-e.js |
---
esid: sec-grammar-notation
description: >
The `get` contextual keyword must not contain Unicode escape sequences.
info: |
Terminal symbols of the lexical, RegExp, and numeric string grammars are shown
in fixed width font, both in the productions of the grammars and throughout this
specification whenever the text directly refers to such a terminal symbol. These
are to appear in a script exactly as written. All terminal symbol code points
specified in this way are to be understood as the appropriate Unicode code points
from the Basic Latin range, as opposed to any similar-looking code points from
other Unicode ranges.
negative:
phase: parse
type: SyntaxError
--- |
902 |
escaped-get-g.js |
---
esid: sec-grammar-notation
description: >
The `get` contextual keyword must not contain Unicode escape sequences.
info: |
Terminal symbols of the lexical, RegExp, and numeric string grammars are shown
in fixed width font, both in the productions of the grammars and throughout this
specification whenever the text directly refers to such a terminal symbol. These
are to appear in a script exactly as written. All terminal symbol code points
specified in this way are to be understood as the appropriate Unicode code points
from the Basic Latin range, as opposed to any similar-looking code points from
other Unicode ranges.
negative:
phase: parse
type: SyntaxError
--- |
902 |
escaped-get-t.js |
---
esid: sec-grammar-notation
description: >
The `get` contextual keyword must not contain Unicode escape sequences.
info: |
Terminal symbols of the lexical, RegExp, and numeric string grammars are shown
in fixed width font, both in the productions of the grammars and throughout this
specification whenever the text directly refers to such a terminal symbol. These
are to appear in a script exactly as written. All terminal symbol code points
specified in this way are to be understood as the appropriate Unicode code points
from the Basic Latin range, as opposed to any similar-looking code points from
other Unicode ranges.
negative:
phase: parse
type: SyntaxError
--- |
902 |
escaped-get.js |
---
esid: sec-grammar-notation
description: >
The `get` contextual keyword must not contain Unicode escape sequences.
info: |
Terminal symbols are shown
in fixed width font, both in the productions of the grammars and throughout this
specification whenever the text directly refers to such a terminal symbol. These
are to appear in a script exactly as written. All terminal symbol code points
specified in this way are to be understood as the appropriate Unicode code points
from the Basic Latin range, as opposed to any similar-looking code points from
other Unicode ranges.
negative:
phase: parse
type: SyntaxError
--- |
862 |
escaped-set-e.js |
---
esid: sec-grammar-notation
description: >
The `set` contextual keyword must not contain Unicode escape sequences.
info: |
Terminal symbols of the lexical, RegExp, and numeric string grammars are shown
in fixed width font, both in the productions of the grammars and throughout this
specification whenever the text directly refers to such a terminal symbol. These
are to appear in a script exactly as written. All terminal symbol code points
specified in this way are to be understood as the appropriate Unicode code points
from the Basic Latin range, as opposed to any similar-looking code points from
other Unicode ranges.
negative:
phase: parse
type: SyntaxError
--- |
903 |
escaped-set-s.js |
---
esid: sec-grammar-notation
description: >
The `set` contextual keyword must not contain Unicode escape sequences.
info: |
Terminal symbols of the lexical, RegExp, and numeric string grammars are shown
in fixed width font, both in the productions of the grammars and throughout this
specification whenever the text directly refers to such a terminal symbol. These
are to appear in a script exactly as written. All terminal symbol code points
specified in this way are to be understood as the appropriate Unicode code points
from the Basic Latin range, as opposed to any similar-looking code points from
other Unicode ranges.
negative:
phase: parse
type: SyntaxError
--- |
903 |
escaped-set-t.js |
---
esid: sec-grammar-notation
description: >
The `set` contextual keyword must not contain Unicode escape sequences.
info: |
Terminal symbols of the lexical, RegExp, and numeric string grammars are shown
in fixed width font, both in the productions of the grammars and throughout this
specification whenever the text directly refers to such a terminal symbol. These
are to appear in a script exactly as written. All terminal symbol code points
specified in this way are to be understood as the appropriate Unicode code points
from the Basic Latin range, as opposed to any similar-looking code points from
other Unicode ranges.
negative:
phase: parse
type: SyntaxError
--- |
903 |
escaped-set.js |
---
esid: sec-grammar-notation
description: >
The `set` contextual keyword must not contain Unicode escape sequences.
info: |
Terminal symbols are shown
in fixed width font, both in the productions of the grammars and throughout this
specification whenever the text directly refers to such a terminal symbol. These
are to appear in a script exactly as written. All terminal symbol code points
specified in this way are to be understood as the appropriate Unicode code points
from the Basic Latin range, as opposed to any similar-looking code points from
other Unicode ranges.
negative:
phase: parse
type: SyntaxError
--- |
863 |
fn-name-fn.js |
---
es6id: 12.2.6.9
description: Assignment of function `name` attribute (MethodDefinition)
info: |
6. If IsAnonymousFunctionDefinition(AssignmentExpression) is true, then
a. Let hasNameProperty be HasOwnProperty(propValue, "name").
b. ReturnIfAbrupt(hasNameProperty).
c. If hasNameProperty is false, perform SetFunctionName(propValue,
propKey).
includes: [propertyHelper.js]
features: [Symbol]
--- |
1079 |
fn-name-gen.js |
---
es6id: 14.4.13
description: >
Assignment of function `name` attribute (GeneratorMethod)
info: |
GeneratorMethod :
PropertyName ( StrictFormalParameters ) { GeneratorBody }
[...]
9. Perform SetFunctionName(closure, propKey).
includes: [propertyHelper.js]
features: [generators, Symbol]
--- |
968 |
forbidden-ext |
|
|
gen-meth-array-destructuring-param-strict-body.js |
|
5598 |
gen-meth-dflt-params-abrupt.js |
---
description: Abrupt completion returned by evaluation of initializer (generator method)
esid: sec-generator-function-definitions-runtime-semantics-propertydefinitionevaluation
features: [default-parameters, generators]
flags: [generated]
info: |
GeneratorMethod :
PropertyName ( StrictFormalParameters ) { GeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this GeneratorMethod is strict mode code,
let strict be true. Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be GeneratorFunctionCreate(Method,
StrictFormalParameters, GeneratorBody, scope, strict).
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
2351 |
gen-meth-dflt-params-arg-val-not-undefined.js |
---
description: Use of initializer when argument value is not `undefined` (generator method)
esid: sec-generator-function-definitions-runtime-semantics-propertydefinitionevaluation
features: [default-parameters, generators]
flags: [generated]
info: |
GeneratorMethod :
PropertyName ( StrictFormalParameters ) { GeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this GeneratorMethod is strict mode code,
let strict be true. Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be GeneratorFunctionCreate(Method,
StrictFormalParameters, GeneratorBody, scope, strict).
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
[...]
23. Let iteratorRecord be Record {[[Iterator]]:
CreateListIterator(argumentsList), [[Done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
a. Perform ? IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
--- |
3234 |
gen-meth-dflt-params-arg-val-undefined.js |
---
description: Use of initializer when argument value is `undefined` (generator method)
esid: sec-generator-function-definitions-runtime-semantics-propertydefinitionevaluation
features: [default-parameters, generators]
flags: [generated]
info: |
GeneratorMethod :
PropertyName ( StrictFormalParameters ) { GeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this GeneratorMethod is strict mode code,
let strict be true. Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be GeneratorFunctionCreate(Method,
StrictFormalParameters, GeneratorBody, scope, strict).
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
[...]
23. Let iteratorRecord be Record {[[Iterator]]:
CreateListIterator(argumentsList), [[Done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
a. Perform ? IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
--- |
2497 |
gen-meth-dflt-params-duplicates.js |
---
description: It is a Syntax Error if BoundNames of FormalParameters contains any duplicate elements. (generator method)
esid: sec-generator-function-definitions-runtime-semantics-propertydefinitionevaluation
features: [default-parameters, generators]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
GeneratorMethod :
PropertyName ( StrictFormalParameters ) { GeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this GeneratorMethod is strict mode code,
let strict be true. Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be GeneratorFunctionCreate(Method,
StrictFormalParameters, GeneratorBody, scope, strict).
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
14.1.2 Static Semantics: Early Errors
StrictFormalParameters : FormalParameters
- It is a Syntax Error if BoundNames of FormalParameters contains any
duplicate elements.
FormalParameters : FormalParameterList
- It is a Syntax Error if IsSimpleParameterList of FormalParameterList is
false and BoundNames of FormalParameterList contains any duplicate
elements.
--- |
2185 |
gen-meth-dflt-params-ref-later.js |
---
description: Referencing a parameter that occurs later in the ParameterList (generator method)
esid: sec-generator-function-definitions-runtime-semantics-propertydefinitionevaluation
features: [default-parameters, generators]
flags: [generated]
info: |
GeneratorMethod :
PropertyName ( StrictFormalParameters ) { GeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this GeneratorMethod is strict mode code,
let strict be true. Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be GeneratorFunctionCreate(Method,
StrictFormalParameters, GeneratorBody, scope, strict).
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
2334 |
gen-meth-dflt-params-ref-prior.js |
---
description: Referencing a parameter that occurs earlier in the ParameterList (generator method)
esid: sec-generator-function-definitions-runtime-semantics-propertydefinitionevaluation
features: [default-parameters, generators]
flags: [generated]
info: |
GeneratorMethod :
PropertyName ( StrictFormalParameters ) { GeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this GeneratorMethod is strict mode code,
let strict be true. Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be GeneratorFunctionCreate(Method,
StrictFormalParameters, GeneratorBody, scope, strict).
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
2530 |
gen-meth-dflt-params-ref-self.js |
---
description: Referencing a parameter from within its own initializer (generator method)
esid: sec-generator-function-definitions-runtime-semantics-propertydefinitionevaluation
features: [default-parameters, generators]
flags: [generated]
info: |
GeneratorMethod :
PropertyName ( StrictFormalParameters ) { GeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this GeneratorMethod is strict mode code,
let strict be true. Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be GeneratorFunctionCreate(Method,
StrictFormalParameters, GeneratorBody, scope, strict).
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
2323 |
gen-meth-dflt-params-rest.js |
---
description: RestParameter does not support an initializer (generator method)
esid: sec-generator-function-definitions-runtime-semantics-propertydefinitionevaluation
features: [default-parameters, generators]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
GeneratorMethod :
PropertyName ( StrictFormalParameters ) { GeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this GeneratorMethod is strict mode code,
let strict be true. Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be GeneratorFunctionCreate(Method,
StrictFormalParameters, GeneratorBody, scope, strict).
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
14.1 Function Definitions
Syntax
FunctionRestParameter[Yield] :
BindingRestElement[?Yield]
13.3.3 Destructuring Binding Patterns
Syntax
BindingRestElement[Yield] :
...BindingIdentifier[?Yield]
...BindingPattern[?Yield]
--- |
2004 |
gen-meth-dflt-params-trailing-comma.js |
---
description: A trailing comma should not increase the respective length, using default parameters (generator method)
esid: sec-generator-function-definitions-runtime-semantics-propertydefinitionevaluation
features: [generators]
flags: [generated]
info: |
GeneratorMethod :
PropertyName ( StrictFormalParameters ) { GeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this GeneratorMethod is strict mode code,
let strict be true. Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be GeneratorFunctionCreate(Method,
StrictFormalParameters, GeneratorBody, scope, strict).
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
Trailing comma in the parameters list
14.1 Function Definitions
FormalParameters[Yield, Await] : FormalParameterList[?Yield, ?Await] ,
--- |
2196 |
gen-meth-eval-var-scope-syntax-err.js |
---
description: sloppy direct eval in params introduces var (generator method in sloppy code)
esid: sec-generator-function-definitions-runtime-semantics-propertydefinitionevaluation
features: [default-parameters, generators]
flags: [generated, noStrict]
info: |
GeneratorMethod :
PropertyName ( StrictFormalParameters ) { GeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this GeneratorMethod is strict mode code,
let strict be true. Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be GeneratorFunctionCreate(Method,
StrictFormalParameters, GeneratorBody, scope, strict).
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
Runtime Semantics: IteratorBindingInitialization
FormalParameter : BindingElement
1. Return the result of performing IteratorBindingInitialization for BindingElement with arguments iteratorRecord and environment.
--- |
2138 |
gen-meth-object-destructuring-param-strict-body.js |
|
5601 |
gen-meth-params-trailing-comma-multiple.js |
---
description: A trailing comma should not increase the respective length, using multiple parameters (generator method)
esid: sec-generator-function-definitions-runtime-semantics-propertydefinitionevaluation
features: [generators]
flags: [generated]
info: |
GeneratorMethod :
PropertyName ( StrictFormalParameters ) { GeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this GeneratorMethod is strict mode code,
let strict be true. Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be GeneratorFunctionCreate(Method,
StrictFormalParameters, GeneratorBody, scope, strict).
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
Trailing comma in the parameters list
14.1 Function Definitions
FormalParameters[Yield, Await] : FormalParameterList[?Yield, ?Await] ,
--- |
2189 |
gen-meth-params-trailing-comma-single.js |
---
description: A trailing comma should not increase the respective length, using a single parameter (generator method)
esid: sec-generator-function-definitions-runtime-semantics-propertydefinitionevaluation
features: [generators]
flags: [generated]
info: |
GeneratorMethod :
PropertyName ( StrictFormalParameters ) { GeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this GeneratorMethod is strict mode code,
let strict be true. Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be GeneratorFunctionCreate(Method,
StrictFormalParameters, GeneratorBody, scope, strict).
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
Trailing comma in the parameters list
14.1 Function Definitions
FormalParameters[Yield, Await] : FormalParameterList[?Yield, ?Await] ,
--- |
2151 |
gen-meth-rest-param-strict-body.js |
|
5607 |
gen-meth-rest-params-trailing-comma-early-error.js |
---
description: It's a syntax error if a FunctionRestParameter is followed by a trailing comma (generator method)
esid: sec-generator-function-definitions-runtime-semantics-propertydefinitionevaluation
features: [generators]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
GeneratorMethod :
PropertyName ( StrictFormalParameters ) { GeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this GeneratorMethod is strict mode code,
let strict be true. Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be GeneratorFunctionCreate(Method,
StrictFormalParameters, GeneratorBody, scope, strict).
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
Trailing comma in the parameters list
14.1 Function Definitions
FormalParameters[Yield, Await] :
[empty]
FunctionRestParameter[?Yield, ?Await]
FormalParameterList[?Yield, ?Await]
FormalParameterList[?Yield, ?Await] ,
FormalParameterList[?Yield, ?Await] , FunctionRestParameter[?Yield, ?Await]
--- |
2113 |
gen-yield-as-binding-identifier-escaped.js |
---
description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Generator method)
esid: prod-GeneratorMethod
features: [generators]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
14.4 Generator Function Definitions
GeneratorMethod[Yield, Await]:
PropertyName[?Yield, ?Await] ( UniqueFormalParameters[+Yield, ~Await] ) { GeneratorBody }
BindingIdentifier : Identifier
It is a Syntax Error if this production has a [Yield] parameter and
StringValue of Identifier is "yield".
--- |
878 |
gen-yield-as-binding-identifier.js |
---
description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Generator method)
esid: prod-GeneratorMethod
features: [generators]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
14.4 Generator Function Definitions
GeneratorMethod[Yield, Await]:
PropertyName[?Yield, ?Await] ( UniqueFormalParameters[+Yield, ~Await] ) { GeneratorBody }
BindingIdentifier : Identifier
It is a Syntax Error if this production has a [Yield] parameter and
StringValue of Identifier is "yield".
--- |
865 |
gen-yield-as-identifier-reference-escaped.js |
---
description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Generator method)
esid: prod-GeneratorMethod
features: [generators]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
14.4 Generator Function Definitions
GeneratorMethod[Yield, Await]:
PropertyName[?Yield, ?Await] ( UniqueFormalParameters[+Yield, ~Await] ) { GeneratorBody }
IdentifierReference : Identifier
It is a Syntax Error if this production has a [Yield] parameter and
StringValue of Identifier is "yield".
--- |
886 |
gen-yield-as-identifier-reference.js |
---
description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Generator method)
esid: prod-GeneratorMethod
features: [generators]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
14.4 Generator Function Definitions
GeneratorMethod[Yield, Await]:
PropertyName[?Yield, ?Await] ( UniqueFormalParameters[+Yield, ~Await] ) { GeneratorBody }
IdentifierReference : Identifier
It is a Syntax Error if this production has a [Yield] parameter and
StringValue of Identifier is "yield".
--- |
873 |
gen-yield-as-label-identifier-escaped.js |
---
description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Generator method)
esid: prod-GeneratorMethod
features: [generators]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
14.4 Generator Function Definitions
GeneratorMethod[Yield, Await]:
PropertyName[?Yield, ?Await] ( UniqueFormalParameters[+Yield, ~Await] ) { GeneratorBody }
LabelIdentifier : Identifier
It is a Syntax Error if this production has a [Yield] parameter and
StringValue of Identifier is "yield".
--- |
870 |
gen-yield-as-label-identifier.js |
---
description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Generator method)
esid: prod-GeneratorMethod
features: [generators]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
14.4 Generator Function Definitions
GeneratorMethod[Yield, Await]:
PropertyName[?Yield, ?Await] ( UniqueFormalParameters[+Yield, ~Await] ) { GeneratorBody }
LabelIdentifier : Identifier
It is a Syntax Error if this production has a [Yield] parameter and
StringValue of Identifier is "yield".
--- |
857 |
gen-yield-identifier-non-strict.js |
---
description: Use of yield as a valid identifier in a function body inside a generator body in non strict mode (Generator method - valid for non-strict only cases)
esid: prod-GeneratorMethod
features: [generators]
flags: [generated, noStrict]
info: |
14.4 Generator Function Definitions
GeneratorMethod[Yield, Await]:
PropertyName ( UniqueFormalParameters ) { GeneratorBody }
--- |
1023 |
gen-yield-identifier-spread-non-strict.js |
---
description: Mixed use of object spread and yield as a valid identifier in a function body inside a generator body in non strict mode (Generator method - valid for non-strict only cases)
esid: prod-GeneratorMethod
features: [Symbol, object-spread, generators]
flags: [generated, noStrict]
info: |
14.4 Generator Function Definitions
GeneratorMethod[Yield, Await]:
PropertyName ( UniqueFormalParameters ) { GeneratorBody }
Spread Properties
PropertyDefinition[Yield]:
(...)
...AssignmentExpression[In, ?Yield]
--- |
1635 |
gen-yield-identifier-spread-strict-strict.js |
---
description: It's an early error if the AssignmentExpression is a function body with yield as an identifier in strict mode. (Generator method)
esid: prod-GeneratorMethod
features: [object-spread, generators]
flags: [generated, onlyStrict]
negative:
phase: parse
type: SyntaxError
info: |
14.4 Generator Function Definitions
GeneratorMethod[Yield, Await]:
PropertyName[?Yield, ?Await] ( UniqueFormalParameters[+Yield, ~Await] ) { GeneratorBody }
Spread Properties
PropertyDefinition[Yield]:
(...)
...AssignmentExpression[In, ?Yield]
--- |
1082 |
gen-yield-identifier-strict-strict.js |
---
description: It's an early error if the generator body has another function body with yield as an identifier in strict mode. (Generator method)
esid: prod-GeneratorMethod
features: [generators]
flags: [generated, onlyStrict]
negative:
phase: parse
type: SyntaxError
info: |
14.4 Generator Function Definitions
GeneratorMethod[Yield, Await]:
PropertyName[?Yield, ?Await] ( UniqueFormalParameters[+Yield, ~Await] ) { GeneratorBody }
--- |
910 |
gen-yield-spread-arr-multiple.js |
---
description: Use yield value in a array spread position (Generator method)
esid: prod-GeneratorMethod
features: [generators]
flags: [generated]
includes: [compareArray.js]
info: |
14.4 Generator Function Definitions
GeneratorMethod[Yield, Await]:
PropertyName[?Yield, ?Await] ( UniqueFormalParameters[+Yield, ~Await] ) { GeneratorBody }
Array Initializer
SpreadElement[Yield, Await]:
...AssignmentExpression[+In, ?Yield, ?Await]
--- |
1022 |
gen-yield-spread-arr-single.js |
---
description: Use yield value in a array spread position (Generator method)
esid: prod-GeneratorMethod
features: [generators]
flags: [generated]
info: |
14.4 Generator Function Definitions
GeneratorMethod[Yield, Await]:
PropertyName[?Yield, ?Await] ( UniqueFormalParameters[+Yield, ~Await] ) { GeneratorBody }
Array Initializer
SpreadElement[Yield, Await]:
...AssignmentExpression[+In, ?Yield, ?Await]
--- |
1178 |
gen-yield-spread-obj.js |
---
description: Use yield value in a object spread position (Generator method)
esid: prod-GeneratorMethod
features: [object-spread, generators]
flags: [generated]
info: |
14.4 Generator Function Definitions
GeneratorMethod[Yield, Await]:
PropertyName[?Yield, ?Await] ( UniqueFormalParameters[+Yield, ~Await] ) { GeneratorBody }
Spread Properties
PropertyDefinition[Yield]:
(...)
...AssignmentExpression[In, ?Yield]
--- |
1111 |
generator-invoke-ctor.js |
---
description: >
Generator functions declared as methods cannot be used as constructors.
es6id: 14.4.13
features: [generators]
--- |
415 |
generator-invoke-fn-no-strict.js |
---
description: >
In the absence of the "use strict" directive, generator functions declared
as methods obey "global" ThisMode semantics.
es6id: 14.4.13
flags: [noStrict]
features: [generators]
--- |
562 |
generator-invoke-fn-strict.js |
---
description: >
In the presence of the "use strict" directive, generator functions declared
as methods obey "strict" ThisMode semantics.
es6id: 14.4.13
flags: [noStrict]
features: [generators]
--- |
538 |
generator-length-dflt.js |
---
es6id: 14.1.6
description: >
Default parameters' effect on function length
info: |
Function length is counted by the non initialized parameters in the left.
9.2.4 FunctionInitialize (F, kind, ParameterList, Body, Scope)
[...]
2. Let len be the ExpectedArgumentCount of ParameterList.
3. Perform ! DefinePropertyOrThrow(F, "length", PropertyDescriptor{[[Value]]:
len, [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true}).
[...]
FormalsList : FormalParameter
1. If HasInitializer of FormalParameter is true return 0
2. Return 1.
FormalsList : FormalsList , FormalParameter
1. Let count be the ExpectedArgumentCount of FormalsList.
2. If HasInitializer of FormalsList is true or HasInitializer of
FormalParameter is true, return count.
3. Return count+1.
features: [generators, default-parameters]
includes: [propertyHelper.js]
--- |
1643 |
generator-length.js |
---
description: >
Generator functions declared as methods have a `length` property that
describes the number of formal parameters.
es6id: 14.4.13
includes: [propertyHelper.js]
features: [generators]
--- |
537 |
generator-name-prop-string.js |
---
description: >
Generator functions declared as methods are assigned a `name` property
according to the string value of their property name.
es6id: 14.4.13
includes: [propertyHelper.js]
features: [generators]
--- |
547 |
generator-name-prop-symbol.js |
---
description: >
Generator functions declared as methods are assigned a `name` property
according to the string value of their property name.
es6id: 14.4.13
includes: [propertyHelper.js]
features: [Symbol, generators]
--- |
576 |
generator-no-yield.js |
---
description: >
Generators declared with GeneratorMethod syntax do not require a
`yield` expression.
features: [generators]
es6id: 14.4
--- |
477 |
generator-param-id-yield.js |
---
description: >
The BindingIdentifier of a SingleNameBinding witihn the FormalParameters of
a GeneratorMethod may not be the `yield` keyword.
es6id: 14.4
features: [generators]
flags: [noStrict]
negative:
phase: parse
type: SyntaxError
--- |
476 |
generator-param-init-yield.js |
---
description: >
The Initializer of a SingleNameBinding witihn the FormalParameters of a
GeneratorMethod may not contain the `yield` keyword.
es6id: 14.4
features: [generators]
flags: [noStrict]
negative:
phase: parse
type: SyntaxError
--- |
504 |
generator-param-redecl-const.js |
---
info: |
GeneratorMethod early SyntaxError when lexical declaration
inside generator shadows parameter name
features: [generators]
es6id: 14.4.1
author: Sam Mikes
description: GeneratorMethod error with lexical shadowing
negative:
phase: parse
type: SyntaxError
--- |
475 |
generator-param-redecl-let.js |
---
info: |
GeneratorMethod early SyntaxError when lexical declaration
inside generator shadows parameter name
features: [generators]
es6id: 14.4.1
author: Sam Mikes
description: GeneratorMethod error with lexical shadowing
negative:
phase: parse
type: SyntaxError
--- |
473 |
generator-params.js |
---
description: >
Generator functions declared as methods honor their declared formal
parameters.
es6id: 14.4.13
features: [generators]
--- |
611 |
generator-prop-name-eval-error.js |
---
description: >
Errors thrown during method definition are forwarded to the runtime.
es6id: 14.4.13
features: [generators]
--- |
413 |
generator-prop-name-yield-expr.js |
---
description: >
When the `yield` keyword occurs within the PropertyName of a
GeneratorMethod within a generator function, it behaves as a
YieldExpression.
es6id: 14.4
features: [generators]
flags: [noStrict]
--- |
874 |
generator-prop-name-yield-id.js |
---
description: >
When the `yield` keyword occurs within the PropertyName of a
GeneratorMethod outside of a generator function, it behaves as an
Identifier.
es6id: 14.4
features: [generators]
flags: [noStrict]
--- |
574 |
generator-property-desc.js |
---
description: >
Generator functions declared as methods are defined as enumerable,
writable, configurable properties on the initialized object.
es6id: 14.4.13
includes: [propertyHelper.js]
features: [generators]
--- |
518 |
generator-prototype-prop.js |
---
description: >
Generator functions declared as methods define a `prototype` property.
es6id: 14.4.13
includes: [propertyHelper.js]
features: [generators]
--- |
636 |
generator-prototype.js |
---
description: >
The prototype of generator functions declared as methods is the
Generator Prototype.
es6id: 14.4.13
features: [generators]
--- |
446 |
generator-return.js |
---
description: >
`return` is a valid statement within generator function bodies.
features: [generators]
es6id: 14.4
--- |
576 |
generator-super-call-body.js |
---
info: |
GeneratorMethod early SyntaxError when super is called
directly inside generator body
features: [generators]
es6id: 14.4.1
author: Sam Mikes
description: GeneratorMethod error if HasDirectSuper in body
negative:
phase: parse
type: SyntaxError
--- |
461 |
generator-super-call-param.js |
---
info: |
GeneratorMethod early SyntaxError when super is called
directly inside generator args
features: [generators]
es6id: 14.4.1
author: Sam Mikes
description: GeneratorMethod error if HasDirectSuper in args
negative:
phase: parse
type: SyntaxError
--- |
454 |
generator-super-prop-body.js |
---
info: |
GeneratorMethod can reference SuperProperty in body
features: [generators]
es6id: 14.4.1
author: Sam Mikes
description: GeneratorMethod body uses SuperProperty (allowed)
--- |
462 |
generator-super-prop-param.js |
---
info: |
GeneratorMethod can reference SuperProperty in default parameters
es6id: 14.4.1
author: Sam Mikes
description: GeneratorMethod uses SuperProperty (allowed)
features: [default-parameters, generators, super]
--- |
493 |
generator-use-strict-with-non-simple-param.js |
---
esid: sec-generator-function-definitions-static-semantics-early-errors
description: >
A SyntaxError is thrown if a generator method contains a non-simple parameter list and a UseStrict directive.
info: |
Static Semantics: Early Errors
It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and IsSimpleParameterList of StrictFormalParameters is false.
negative:
phase: parse
type: SyntaxError
features: [generators]
--- |
682 |
meth-array-destructuring-param-strict-body.js |
|
5357 |
meth-dflt-params-abrupt.js |
---
description: Abrupt completion returned by evaluation of initializer (method)
esid: sec-runtime-semantics-definemethod
features: [default-parameters]
flags: [generated]
info: |
MethodDefinition : PropertyName ( StrictFormalParameters ) { FunctionBody }
[...]
6. Let closure be FunctionCreate(kind, StrictFormalParameters,
FunctionBody, scope, strict). If functionPrototype was passed as a
parameter then pass its value as the functionPrototype optional argument
of FunctionCreate.
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
2100 |
meth-dflt-params-arg-val-not-undefined.js |
---
description: Use of initializer when argument value is not `undefined` (method)
esid: sec-runtime-semantics-definemethod
features: [default-parameters]
flags: [generated]
info: |
MethodDefinition : PropertyName ( StrictFormalParameters ) { FunctionBody }
[...]
6. Let closure be FunctionCreate(kind, StrictFormalParameters,
FunctionBody, scope, strict). If functionPrototype was passed as a
parameter then pass its value as the functionPrototype optional argument
of FunctionCreate.
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
[...]
23. Let iteratorRecord be Record {[[Iterator]]:
CreateListIterator(argumentsList), [[Done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
a. Perform ? IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
--- |
2976 |
meth-dflt-params-arg-val-undefined.js |
---
description: Use of initializer when argument value is `undefined` (method)
esid: sec-runtime-semantics-definemethod
features: [default-parameters]
flags: [generated]
info: |
MethodDefinition : PropertyName ( StrictFormalParameters ) { FunctionBody }
[...]
6. Let closure be FunctionCreate(kind, StrictFormalParameters,
FunctionBody, scope, strict). If functionPrototype was passed as a
parameter then pass its value as the functionPrototype optional argument
of FunctionCreate.
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
[...]
23. Let iteratorRecord be Record {[[Iterator]]:
CreateListIterator(argumentsList), [[Done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
a. Perform ? IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
--- |
2239 |
meth-dflt-params-duplicates.js |
---
description: It is a Syntax Error if BoundNames of FormalParameters contains any duplicate elements. (method)
esid: sec-runtime-semantics-definemethod
features: [default-parameters]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
MethodDefinition : PropertyName ( StrictFormalParameters ) { FunctionBody }
[...]
6. Let closure be FunctionCreate(kind, StrictFormalParameters,
FunctionBody, scope, strict). If functionPrototype was passed as a
parameter then pass its value as the functionPrototype optional argument
of FunctionCreate.
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
14.1.2 Static Semantics: Early Errors
StrictFormalParameters : FormalParameters
- It is a Syntax Error if BoundNames of FormalParameters contains any
duplicate elements.
FormalParameters : FormalParameterList
- It is a Syntax Error if IsSimpleParameterList of FormalParameterList is
false and BoundNames of FormalParameterList contains any duplicate
elements.
--- |
1944 |
meth-dflt-params-ref-later.js |
---
description: Referencing a parameter that occurs later in the ParameterList (method)
esid: sec-runtime-semantics-definemethod
features: [default-parameters]
flags: [generated]
info: |
MethodDefinition : PropertyName ( StrictFormalParameters ) { FunctionBody }
[...]
6. Let closure be FunctionCreate(kind, StrictFormalParameters,
FunctionBody, scope, strict). If functionPrototype was passed as a
parameter then pass its value as the functionPrototype optional argument
of FunctionCreate.
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
2083 |
meth-dflt-params-ref-prior.js |
---
description: Referencing a parameter that occurs earlier in the ParameterList (method)
esid: sec-runtime-semantics-definemethod
features: [default-parameters]
flags: [generated]
info: |
MethodDefinition : PropertyName ( StrictFormalParameters ) { FunctionBody }
[...]
6. Let closure be FunctionCreate(kind, StrictFormalParameters,
FunctionBody, scope, strict). If functionPrototype was passed as a
parameter then pass its value as the functionPrototype optional argument
of FunctionCreate.
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
2272 |
meth-dflt-params-ref-self.js |
---
description: Referencing a parameter from within its own initializer (method)
esid: sec-runtime-semantics-definemethod
features: [default-parameters]
flags: [generated]
info: |
MethodDefinition : PropertyName ( StrictFormalParameters ) { FunctionBody }
[...]
6. Let closure be FunctionCreate(kind, StrictFormalParameters,
FunctionBody, scope, strict). If functionPrototype was passed as a
parameter then pass its value as the functionPrototype optional argument
of FunctionCreate.
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
2072 |
meth-dflt-params-rest.js |
---
description: RestParameter does not support an initializer (method)
esid: sec-runtime-semantics-definemethod
features: [default-parameters]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
MethodDefinition : PropertyName ( StrictFormalParameters ) { FunctionBody }
[...]
6. Let closure be FunctionCreate(kind, StrictFormalParameters,
FunctionBody, scope, strict). If functionPrototype was passed as a
parameter then pass its value as the functionPrototype optional argument
of FunctionCreate.
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
14.1 Function Definitions
Syntax
FunctionRestParameter[Yield] :
BindingRestElement[?Yield]
13.3.3 Destructuring Binding Patterns
Syntax
BindingRestElement[Yield] :
...BindingIdentifier[?Yield]
...BindingPattern[?Yield]
--- |
1763 |
meth-dflt-params-trailing-comma.js |
---
description: A trailing comma should not increase the respective length, using default parameters (method)
esid: sec-runtime-semantics-definemethod
flags: [generated]
info: |
MethodDefinition : PropertyName ( StrictFormalParameters ) { FunctionBody }
[...]
6. Let closure be FunctionCreate(kind, StrictFormalParameters,
FunctionBody, scope, strict). If functionPrototype was passed as a
parameter then pass its value as the functionPrototype optional argument
of FunctionCreate.
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
Trailing comma in the parameters list
14.1 Function Definitions
FormalParameters[Yield, Await] : FormalParameterList[?Yield, ?Await] ,
--- |
1927 |
meth-eval-var-scope-syntax-err.js |
---
description: sloppy direct eval in params introduces var (method in sloppy code)
esid: sec-runtime-semantics-definemethod
features: [default-parameters]
flags: [generated, noStrict]
info: |
MethodDefinition : PropertyName ( StrictFormalParameters ) { FunctionBody }
[...]
6. Let closure be FunctionCreate(kind, StrictFormalParameters,
FunctionBody, scope, strict). If functionPrototype was passed as a
parameter then pass its value as the functionPrototype optional argument
of FunctionCreate.
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
Runtime Semantics: IteratorBindingInitialization
FormalParameter : BindingElement
1. Return the result of performing IteratorBindingInitialization for BindingElement with arguments iteratorRecord and environment.
--- |
1887 |
meth-object-destructuring-param-strict-body.js |
|
5360 |
meth-params-trailing-comma-multiple.js |
---
description: A trailing comma should not increase the respective length, using multiple parameters (method)
esid: sec-runtime-semantics-definemethod
flags: [generated]
info: |
MethodDefinition : PropertyName ( StrictFormalParameters ) { FunctionBody }
[...]
6. Let closure be FunctionCreate(kind, StrictFormalParameters,
FunctionBody, scope, strict). If functionPrototype was passed as a
parameter then pass its value as the functionPrototype optional argument
of FunctionCreate.
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
Trailing comma in the parameters list
14.1 Function Definitions
FormalParameters[Yield, Await] : FormalParameterList[?Yield, ?Await] ,
--- |
1920 |
meth-params-trailing-comma-single.js |
---
description: A trailing comma should not increase the respective length, using a single parameter (method)
esid: sec-runtime-semantics-definemethod
flags: [generated]
info: |
MethodDefinition : PropertyName ( StrictFormalParameters ) { FunctionBody }
[...]
6. Let closure be FunctionCreate(kind, StrictFormalParameters,
FunctionBody, scope, strict). If functionPrototype was passed as a
parameter then pass its value as the functionPrototype optional argument
of FunctionCreate.
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
Trailing comma in the parameters list
14.1 Function Definitions
FormalParameters[Yield, Await] : FormalParameterList[?Yield, ?Await] ,
--- |
1882 |
meth-rest-param-strict-body.js |
|
5366 |
meth-rest-params-trailing-comma-early-error.js |
---
description: It's a syntax error if a FunctionRestParameter is followed by a trailing comma (method)
esid: sec-runtime-semantics-definemethod
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
MethodDefinition : PropertyName ( StrictFormalParameters ) { FunctionBody }
[...]
6. Let closure be FunctionCreate(kind, StrictFormalParameters,
FunctionBody, scope, strict). If functionPrototype was passed as a
parameter then pass its value as the functionPrototype optional argument
of FunctionCreate.
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
Trailing comma in the parameters list
14.1 Function Definitions
FormalParameters[Yield, Await] :
[empty]
FunctionRestParameter[?Yield, ?Await]
FormalParameterList[?Yield, ?Await]
FormalParameterList[?Yield, ?Await] ,
FormalParameterList[?Yield, ?Await] , FunctionRestParameter[?Yield, ?Await]
--- |
1861 |
name-invoke-ctor.js |
---
description: >
Functions declared as methods may not be used as constructors.
es6id: 14.3.8
--- |
359 |
name-invoke-fn-no-strict.js |
---
description: >
In the absence of the "use strict" directive, functions declared as methods
obey "global" ThisMode semantics.
es6id: 14.3.8
flags: [noStrict]
--- |
520 |
name-invoke-fn-strict.js |
---
description: >
In the presence of the "use strict" directive, functions declared as
methods obey "strict" ThisMode semantics.
es6id: 14.3.8
flags: [noStrict]
--- |
496 |
name-length-dflt.js |
---
es6id: 14.1.6
description: >
Default parameters' effect on function length
info: |
Function length is counted by the non initialized parameters in the left.
9.2.4 FunctionInitialize (F, kind, ParameterList, Body, Scope)
[...]
2. Let len be the ExpectedArgumentCount of ParameterList.
3. Perform ! DefinePropertyOrThrow(F, "length", PropertyDescriptor{[[Value]]:
len, [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true}).
[...]
FormalsList : FormalParameter
1. If HasInitializer of FormalParameter is true return 0
2. Return 1.
FormalsList : FormalsList , FormalParameter
1. Let count be the ExpectedArgumentCount of FormalsList.
2. If HasInitializer of FormalsList is true or HasInitializer of
FormalParameter is true, return count.
3. Return count+1.
features: [default-parameters]
includes: [propertyHelper.js]
--- |
1627 |
name-length.js |
---
description: >
Functions declared as methods have a `length` property that describes the
number of formal parameters.
es6id: 14.3.8
includes: [propertyHelper.js]
--- |
502 |
name-name-prop-string.js |
---
description: >
Functions declared as methods are assigned a `name` property according to
the string value of their property name.
es6id: 14.3.8
includes: [propertyHelper.js]
--- |
512 |
name-name-prop-symbol.js |
---
description: >
Functions declared as methods are assigned a `name` property according to
the string value of their property name.
es6id: 14.3.8
includes: [propertyHelper.js]
features: [Symbol]
--- |
552 |
name-param-id-yield.js |
---
description: >
The BindingIdentifier of a SingleNameBinding witihn the FormalParameters of
a non-generator MethodDefinition may be the `yield` keyword.
es6id: 14.3
flags: [noStrict]
--- |
465 |
name-param-init-yield.js |
---
description: >
When the `yield` keyword occurs within the Initializer of a
SingleNameBinding within the FormalParameters of a non-generator
MethodDefinition, it behaves as an Identifier.
es6id: 14.3
flags: [noStrict]
--- |
526 |
name-param-redecl.js |
---
description: >
It is a Syntax Error if any element of the BoundNames of
StrictFormalParameters also occurs in the LexicallyDeclaredNames of
FunctionBody.
es6id: 14.3.1
negative:
phase: parse
type: SyntaxError
--- |
479 |
name-params.js |
---
description: >
Functions declared as methods honor their declared formal parameters.
es6id: 14.3.8
--- |
565 |
name-prop-name-eval-error.js |
---
description: >
Errors thrown during method definition are forwarded to the runtime.
es6id: 14.3.8
--- |
388 |
name-prop-name-yield-expr.js |
---
description: >
When the `yield` keyword occurs within the PropertyName of a
non-generator MethodDefinition within a generator function, it behaves as a
YieldExpression.
es6id: 14.3
features: [generators]
flags: [noStrict]
--- |
888 |
name-prop-name-yield-id.js |
---
description: >
When the `yield` keyword occurs within the PropertyName of a
non-generator MethodDefinition outside of a generator function, it behaves
as an Identifier.
es6id: 14.3
flags: [noStrict]
--- |
565 |
name-property-desc.js |
---
description: >
Functions declared as methods are defined as enumerable, writable,
configurable properties on the initialized object.
es6id: 14.3.8
includes: [propertyHelper.js]
--- |
483 |
name-prototype-prop.js |
---
description: >
Functions declared as methods do not define a `prototype` property.
es6id: 14.3.9
--- |
457 |
name-prototype.js |
---
description: >
The prototype of functions declared as methods is the Function prototype.
es6id: 14.3.8
--- |
381 |
name-super-call-body.js |
---
description: >
It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
esid: sec-object-initializer-static-semantics-early-errors
negative:
phase: parse
type: SyntaxError
--- |
430 |
name-super-call-param.js |
---
description: >
It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
esid: sec-object-initializer-static-semantics-early-errors
negative:
phase: parse
type: SyntaxError
--- |
429 |
name-super-prop-body.js |
---
description: >
The HomeObject of Functions declared as methods is the Object prototype.
es6id: 14.3.8
features: [super]
--- |
439 |
name-super-prop-param.js |
---
description: >
The HomeObject of Functions declared as methods is the Object prototype.
es6id: 14.3.8
features: [super]
--- |
444 |
object-method-returns-promise.js |
---
author: Brian Terlson <brian.terlson@microsoft.com>
esid: pending
description: >
Async function method definitions return promises
features: [async-functions]
--- |
453 |
params-dflt-gen-meth-args-unmapped.js |
---
description: Referencing the arguments object from a default parameter (generator method)
esid: sec-generator-function-definitions-runtime-semantics-propertydefinitionevaluation
es6id: 14.4.13
features: [generators, default-parameters]
info: |
GeneratorMethod :
PropertyName ( StrictFormalParameters ) { GeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this GeneratorMethod is strict mode code,
let strict be true. Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be GeneratorFunctionCreate(Method,
StrictFormalParameters, GeneratorBody, scope, strict).
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
2898 |
params-dflt-gen-meth-ref-arguments.js |
---
description: Referencing the arguments object from a default parameter (generator method)
esid: sec-generator-function-definitions-runtime-semantics-propertydefinitionevaluation
es6id: 14.4.13
features: [generators, default-parameters]
info: |
GeneratorMethod :
PropertyName ( StrictFormalParameters ) { GeneratorBody }
1. Let propKey be the result of evaluating PropertyName.
2. ReturnIfAbrupt(propKey).
3. If the function code for this GeneratorMethod is strict mode code,
let strict be true. Otherwise let strict be false.
4. Let scope be the running execution context's LexicalEnvironment.
5. Let closure be GeneratorFunctionCreate(Method,
StrictFormalParameters, GeneratorBody, scope, strict).
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
2468 |
params-dflt-meth-args-unmapped.js |
---
description: Referencing the arguments object from a default parameter (method)
esid: sec-runtime-semantics-definemethod
es6id: 14.3.8
features: [default-parameters]
info: |
MethodDefinition : PropertyName ( StrictFormalParameters ) { FunctionBody }
[...]
6. Let closure be FunctionCreate(kind, StrictFormalParameters,
FunctionBody, scope, strict). If functionPrototype was passed as a
parameter then pass its value as the functionPrototype optional argument
of FunctionCreate.
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
2645 |
params-dflt-meth-ref-arguments.js |
---
description: Referencing the arguments object from a default parameter (method)
esid: sec-runtime-semantics-definemethod
es6id: 14.3.8
features: [default-parameters]
info: |
MethodDefinition : PropertyName ( StrictFormalParameters ) { FunctionBody }
[...]
6. Let closure be FunctionCreate(kind, StrictFormalParameters,
FunctionBody, scope, strict). If functionPrototype was passed as a
parameter then pass its value as the functionPrototype optional argument
of FunctionCreate.
[...]
9.2.1 [[Call]] ( thisArgument, argumentsList)
[...]
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
[...]
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
[...]
9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
[...]
23. Let iteratorRecord be Record {[[iterator]]:
CreateListIterator(argumentsList), [[done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
b. Let formalStatus be IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
2214 |
private-name-early-error-async-fn-inside-class.js |
---
esid: sec-method-definitions-static-semantics-early-errors
description: >
Throws an early SyntaxError if a method definition has a private name even
inside a class body (async method).
info: |
Static Semantics: Early Errors
PropertyDefinition : MethodDefinition
It is a Syntax Error if PrivateBoundNames of MethodDefinition is non-empty.
negative:
phase: parse
type: SyntaxError
features: [class-methods-private, async-functions, class, class-fields-public]
--- |
711 |
private-name-early-error-async-fn.js |
---
esid: sec-method-definitions-static-semantics-early-errors
description: >
Throws an early SyntaxError if a method definition has a private name
(async method).
info: |
Static Semantics: Early Errors
PropertyDefinition : MethodDefinition
It is a Syntax Error if PrivateBoundNames of MethodDefinition is non-empty.
negative:
phase: parse
type: SyntaxError
features: [class-methods-private, async-functions]
--- |
641 |
private-name-early-error-async-gen-inside-class.js |
---
esid: sec-method-definitions-static-semantics-early-errors
description: >
Throws an early SyntaxError if a method definition has a private name even
inside a class body. (async generator)
info: |
Static Semantics: Early Errors
PropertyDefinition : MethodDefinition
It is a Syntax Error if PrivateBoundNames of MethodDefinition is non-empty.
negative:
phase: parse
type: SyntaxError
features: [class-methods-private, async-iteration, class, class-fields-public]
--- |
716 |
private-name-early-error-async-gen.js |
---
esid: sec-method-definitions-static-semantics-early-errors
description: >
Throws an early SyntaxError if a method definition has a private name.
(async generator)
info: |
Static Semantics: Early Errors
PropertyDefinition : MethodDefinition
It is a Syntax Error if PrivateBoundNames of MethodDefinition is non-empty.
negative:
phase: parse
type: SyntaxError
features: [class-methods-private, async-iteration]
--- |
646 |
private-name-early-error-gen-inside-class.js |
---
esid: sec-method-definitions-static-semantics-early-errors
description: >
Throws an early SyntaxError if a method definition has a private name even
inside a class body. (generator)
info: |
Static Semantics: Early Errors
PropertyDefinition : MethodDefinition
It is a Syntax Error if PrivateBoundNames of MethodDefinition is non-empty.
negative:
phase: parse
type: SyntaxError
features: [class-methods-private, generators, class, class-fields-public]
--- |
699 |
private-name-early-error-gen.js |
---
esid: sec-method-definitions-static-semantics-early-errors
description: >
Throws an early SyntaxError if a method definition has a private name.
(generator)
info: |
Static Semantics: Early Errors
PropertyDefinition : MethodDefinition
It is a Syntax Error if PrivateBoundNames of MethodDefinition is non-empty.
negative:
phase: parse
type: SyntaxError
features: [class-methods-private, generators]
--- |
629 |
private-name-early-error-get-method-inside-class.js |
---
esid: sec-method-definitions-static-semantics-early-errors
description: >
Throws an early SyntaxError if a method definition has a private name even
inside a class body. (getter method)
info: |
Static Semantics: Early Errors
PropertyDefinition : MethodDefinition
It is a Syntax Error if PrivateBoundNames of MethodDefinition is non-empty.
negative:
phase: parse
type: SyntaxError
features: [class-methods-private, class, class-fields-public]
--- |
693 |
private-name-early-error-get-method.js |
---
esid: sec-method-definitions-static-semantics-early-errors
description: >
Throws an early SyntaxError if a method definition has a private name.
(getter method)
info: |
Static Semantics: Early Errors
PropertyDefinition : MethodDefinition
It is a Syntax Error if PrivateBoundNames of MethodDefinition is non-empty.
negative:
phase: parse
type: SyntaxError
features: [class-methods-private]
--- |
623 |
private-name-early-error-method-inside-class.js |
---
esid: sec-method-definitions-static-semantics-early-errors
description: >
Throws an early SyntaxError if a method definition has a private name even
inside a class body. (ordinary method)
info: |
Static Semantics: Early Errors
PropertyDefinition : MethodDefinition
It is a Syntax Error if PrivateBoundNames of MethodDefinition is non-empty.
negative:
phase: parse
type: SyntaxError
features: [class-methods-private, class, class-fields-public]
--- |
691 |
private-name-early-error-method.js |
---
esid: sec-method-definitions-static-semantics-early-errors
description: >
Throws an early SyntaxError if a method definition has a private name.
(ordinary method)
info: |
Static Semantics: Early Errors
PropertyDefinition : MethodDefinition
It is a Syntax Error if PrivateBoundNames of MethodDefinition is non-empty.
negative:
phase: parse
type: SyntaxError
features: [class-methods-private]
--- |
621 |
private-name-early-error-set-method-inside-class.js |
---
esid: sec-method-definitions-static-semantics-early-errors
description: >
Throws an early SyntaxError if a method definition has a private name even
inside a class body. (getter method)
info: |
Static Semantics: Early Errors
PropertyDefinition : MethodDefinition
It is a Syntax Error if PrivateBoundNames of MethodDefinition is non-empty.
negative:
phase: parse
type: SyntaxError
features: [class-methods-private, class, class-fields-public]
--- |
694 |
private-name-early-error-set-method.js |
---
esid: sec-method-definitions-static-semantics-early-errors
description: >
Throws an early SyntaxError if a method definition has a private name.
(getter method)
info: |
Static Semantics: Early Errors
PropertyDefinition : MethodDefinition
It is a Syntax Error if PrivateBoundNames of MethodDefinition is non-empty.
negative:
phase: parse
type: SyntaxError
features: [class-methods-private]
--- |
624 |
setter-use-strict-with-non-simple-param.js |
---
esid: sec-method-definitions-static-semantics-early-errors
description: >
A SyntaxError is thrown if a setter method contains a non-simple parameter list and a UseStrict directive.
info: |
Static Semantics: Early Errors
It is a Syntax Error if ContainsUseStrict of FunctionBody is true and IsSimpleParameterList of PropertySetParameterList is false.
negative:
phase: parse
type: SyntaxError
--- |
648 |
shell.js |
|
0 |
static-init-await-binding-accessor.js |
---
esid: sec-class-definitions-static-semantics-early-errors
description: The `await` keyword is interpreted as an identifier within the body of accessor methods
info: |
ClassStaticBlockBody : ClassStaticBlockStatementList
[...]
- It is a Syntax Error if ContainsAwait of ClassStaticBlockStatementList is true.
features: [class-static-block]
--- |
578 |
static-init-await-binding-generator.js |
---
esid: sec-class-definitions-static-semantics-early-errors
description: The `await` keyword is interpreted as an identifier within the parameter list of generator methods
info: |
ClassStaticBlockBody : ClassStaticBlockStatementList
[...]
- It is a Syntax Error if ContainsAwait of ClassStaticBlockStatementList is true.
features: [class-static-block]
--- |
584 |
static-init-await-binding-normal.js |
---
esid: sec-class-definitions-static-semantics-early-errors
description: The `await` keyword is interpreted as an identifier within the parameter list of methods
info: |
ClassStaticBlockBody : ClassStaticBlockStatementList
[...]
- It is a Syntax Error if ContainsAwait of ClassStaticBlockStatementList is true.
features: [class-static-block]
--- |
573 |
static-init-await-reference-accessor.js |
---
esid: sec-class-definitions-static-semantics-early-errors
description: The `await` keyword is interpreted as an identifier within accessor methods
info: |
ClassStaticBlockBody : ClassStaticBlockStatementList
[...]
- It is a Syntax Error if ContainsAwait of ClassStaticBlockStatementList is true.
features: [class-static-block]
--- |
784 |
static-init-await-reference-generator.js |
---
esid: sec-class-definitions-static-semantics-early-errors
description: The `await` keyword is interpreted as an identifier within generator methods
info: |
ClassStaticBlockBody : ClassStaticBlockStatementList
[...]
- It is a Syntax Error if ContainsAwait of ClassStaticBlockStatementList is true.
features: [class-static-block]
--- |
775 |
static-init-await-reference-normal.js |
---
esid: sec-class-definitions-static-semantics-early-errors
description: The `await` keyword is interpreted as an identifier within methods
info: |
ClassStaticBlockBody : ClassStaticBlockStatementList
[...]
- It is a Syntax Error if ContainsAwait of ClassStaticBlockStatementList is true.
features: [class-static-block]
--- |
757 |
use-strict-with-non-simple-param.js |
---
esid: sec-method-definitions-static-semantics-early-errors
description: >
A SyntaxError is thrown if a method contains a non-simple parameter list and a UseStrict directive.
info: |
Static Semantics: Early Errors
It is a Syntax Error if ContainsUseStrict of FunctionBody is true and IsSimpleParameterList of StrictFormalParameters is false.
negative:
phase: parse
type: SyntaxError
--- |
636 |
yield-as-expression-with-rhs.js |
---
description: >
`yield` is a valid expression within generator function bodies.
features: [generators]
es6id: 14.4
--- |
3065 |
yield-as-expression-without-rhs.js |
---
description: >
`yield` is a valid expression within generator function bodies.
features: [generators]
es6id: 14.4
--- |
3125 |
yield-as-function-expression-binding-identifier.js |
---
description: >
`yield` may be used as the binding identifier of a function expression
within generator bodies.
features: [generators]
es6id: 14.1
flags: [noStrict]
--- |
532 |
yield-as-generator-method-binding-identifier.js |
---
description: >
`yield` is a valid BindingIdentifier for GeneratorMethods
features: [generators]
es6id: 12.1.1
--- |
841 |
yield-as-identifier-in-nested-function.js |
---
description: >
`yield` is not a reserved keyword within normal function bodies declared
within generator function bodies.
features: [generators]
es6id: 12.1.1
flags: [noStrict]
--- |
559 |
yield-as-literal-property-name.js |
---
description: >
`yield` may be used as a literal property name in an object literal
within generator function bodies.
features: [generators]
es6id: 12.1.1
--- |
528 |
yield-as-logical-or-expression.js |
---
description: >
`yield` expressions are not LogicalOrExpressions.
features: [generators]
es6id: 12.1.1
negative:
phase: parse
type: SyntaxError
--- |
422 |
yield-as-parameter.js |
---
description: >
`yield` is a reserved keyword within generator function bodies and may
not be used as the binding identifier of a parameter.
features: [generators]
es6id: 12.1.1
negative:
phase: parse
type: SyntaxError
--- |
478 |
yield-as-property-name.js |
---
description: >
`yield` may be used as a literal property name in an object literal
within generator function bodies.
features: [generators]
es6id: 12.1.1
--- |
513 |
yield-as-statement.js |
---
description: >
`yield` is a valid statement within generator function bodies.
features: [generators]
es6id: 14.4
--- |
1245 |
yield-as-yield-operand.js |
---
description: >
`yield` expressions may be used as the right-hand-side of other `yield`
expressions.
features: [generators]
es6id: 14.4
--- |
869 |
yield-newline.js |
---
description: >
Newlines terminate `yield` expressions.
features: [generators]
es6id: 14.4
--- |
668 |
yield-return.js |
---
info: |
Generator can be declared with GeneratorMethod syntax
features: [generators]
es6id: 14.4
author: Sam Mikes
description: can declare generator methods
--- |
434 |
yield-star-after-newline.js |
---
description: >
A newline may not precede the `*` token in a `yield` expression.
features: [generators]
es6id: 14.4
negative:
phase: parse
type: SyntaxError
--- |
426 |
yield-star-before-newline.js |
---
description: >
The right-hand side of a `yield *` expression may appear on a new line.
features: [generators]
es6id: 14.4
--- |
500 |
yield-weak-binding.js |
---
description: >
`yield` expressions bind weakly
features: [generators]
es6id: 14.4
negative:
phase: parse
type: SyntaxError
--- |
392 |