mirror of https://github.com/tc39/test262.git
Generate tests
This commit is contained in:
parent
07a7ac999d
commit
eae139d8ef
|
@ -23,9 +23,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
|
@ -23,9 +23,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
|
@ -23,9 +23,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
|
@ -0,0 +1,59 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-spread-operator.case
|
||||
// - src/arguments/default/async-gen-meth.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using spread args (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 arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
var arr = [2, 3];
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var obj = {
|
||||
async *method() {
|
||||
assert.sameValue(arguments.length, 4);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 1);
|
||||
assert.sameValue(arguments[2], 2);
|
||||
assert.sameValue(arguments[3], 3);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
// Stores a reference `ref` for case evaluation
|
||||
var ref = obj.method;
|
||||
|
||||
ref(42, ...[1], ...arr,).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'generator method invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
|
@ -23,9 +23,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
|
@ -18,9 +18,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
|
@ -18,9 +18,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
|
@ -18,9 +18,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-spread-operator.case
|
||||
// - src/arguments/default/async-gen-named-func-expr.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using spread args (async generator named function expression)
|
||||
esid: sec-asyncgenerator-definitions-evaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier
|
||||
( FormalParameters ) { AsyncGeneratorBody }
|
||||
|
||||
[...]
|
||||
7. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
|
||||
AsyncGeneratorBody, funcEnv, strict).
|
||||
[...]
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
var arr = [2, 3];
|
||||
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
// Stores a reference `ref` for case evaluation
|
||||
var ref;
|
||||
ref = async function* g() {
|
||||
assert.sameValue(arguments.length, 4);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 1);
|
||||
assert.sameValue(arguments[2], 2);
|
||||
assert.sameValue(arguments[3], 3);
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
ref(42, ...[1], ...arr,).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'generator function invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
|
@ -18,9 +18,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
|
@ -18,9 +18,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
|
@ -18,9 +18,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
|
@ -18,9 +18,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-spread-operator.case
|
||||
// - src/arguments/default/async-gen-func-decl.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using spread args (async generator function declaration)
|
||||
esid: sec-asyncgenerator-definitions-instantiatefunctionobject
|
||||
features: [async-iteration]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
AsyncGeneratorDeclaration : async [no LineTerminator here] function * BindingIdentifier
|
||||
( FormalParameters ) { AsyncGeneratorBody }
|
||||
|
||||
[...]
|
||||
3. Let F be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters, AsyncGeneratorBody,
|
||||
scope, strict).
|
||||
[...]
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
var arr = [2, 3];
|
||||
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
// Stores a reference `ref` for case evaluation
|
||||
async function* ref() {
|
||||
assert.sameValue(arguments.length, 4);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 1);
|
||||
assert.sameValue(arguments[2], 2);
|
||||
assert.sameValue(arguments[3], 3);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
ref(42, ...[1], ...arr,).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'generator function invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
|
@ -18,9 +18,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
|
@ -41,9 +41,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
|
@ -41,9 +41,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
|
@ -41,9 +41,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
|
@ -0,0 +1,77 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-spread-operator.case
|
||||
// - src/arguments/default/cls-decl-async-gen-meth.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using spread args (class expression method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
1. Let className be StringValue of BindingIdentifier.
|
||||
2. Let value be the result of ClassDefinitionEvaluation of ClassTail with
|
||||
argument className.
|
||||
[...]
|
||||
|
||||
14.5.14 Runtime Semantics: ClassDefinitionEvaluation
|
||||
|
||||
21. For each ClassElement m in order from methods
|
||||
a. If IsStatic of m is false, then
|
||||
i. Let status be the result of performing
|
||||
PropertyDefinitionEvaluation for m with arguments proto and
|
||||
false.
|
||||
[...]
|
||||
|
||||
Runtime Semantics: PropertyDefinitionEvaluation
|
||||
|
||||
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 arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
var arr = [2, 3];
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
async *method() {
|
||||
assert.sameValue(arguments.length, 4);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 1);
|
||||
assert.sameValue(arguments[2], 2);
|
||||
assert.sameValue(arguments[3], 3);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Stores a reference `ref` for case evaluation
|
||||
var ref = C.prototype.method;
|
||||
|
||||
ref(42, ...[1], ...arr,).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
|
@ -41,9 +41,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
|
@ -41,9 +41,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
|
@ -41,9 +41,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
|
@ -41,9 +41,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-spread-operator.case
|
||||
// - src/arguments/default/cls-decl-async-gen-meth-static.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using spread args (static class expression generator method)
|
||||
esid: sec-runtime-semantics-bindingclassdeclarationevaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
1. Let className be StringValue of BindingIdentifier.
|
||||
2. Let value be the result of ClassDefinitionEvaluation of ClassTail with
|
||||
argument className.
|
||||
[...]
|
||||
|
||||
14.5.14 Runtime Semantics: ClassDefinitionEvaluation
|
||||
|
||||
21. For each ClassElement m in order from methods
|
||||
a. If IsStatic of m is false, then
|
||||
b. Else,
|
||||
Let status be the result of performing PropertyDefinitionEvaluation for
|
||||
m with arguments F and false.
|
||||
[...]
|
||||
|
||||
Runtime Semantics: PropertyDefinitionEvaluation
|
||||
|
||||
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 arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
var arr = [2, 3];
|
||||
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static async *method() {
|
||||
assert.sameValue(arguments.length, 4);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 1);
|
||||
assert.sameValue(arguments[2], 2);
|
||||
assert.sameValue(arguments[3], 3);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Stores a reference `ref` for case evaluation
|
||||
var ref = C.method;
|
||||
|
||||
ref(42, ...[1], ...arr,).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
|
@ -41,9 +41,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-multiple.case
|
||||
// - src/arguments/default/cls-decl-async-private-gen-meth.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using multiple args (static class declaration private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [async-iteration, class, class-methods-private]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
1. Let className be StringValue of BindingIdentifier.
|
||||
2. Let value be the result of ClassDefinitionEvaluation of ClassTail with
|
||||
argument className.
|
||||
[...]
|
||||
|
||||
14.5.14 Runtime Semantics: ClassDefinitionEvaluation
|
||||
|
||||
21. For each ClassElement m in order from methods
|
||||
a. If IsStatic of m is false, then
|
||||
i. Let status be the result of performing
|
||||
PropertyDefinitionEvaluation for m with arguments proto and
|
||||
false.
|
||||
[...]
|
||||
|
||||
Runtime Semantics: PropertyDefinitionEvaluation
|
||||
|
||||
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 arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
async * #method() {
|
||||
assert.sameValue(arguments.length, 2);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 'TC39');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
new C().method(42, 'TC39',).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
|
@ -0,0 +1,74 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-null.case
|
||||
// - src/arguments/default/cls-decl-async-private-gen-meth.template
|
||||
/*---
|
||||
description: A trailing comma after null should not increase the arguments.length (static class declaration private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [async-iteration, class, class-methods-private]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
1. Let className be StringValue of BindingIdentifier.
|
||||
2. Let value be the result of ClassDefinitionEvaluation of ClassTail with
|
||||
argument className.
|
||||
[...]
|
||||
|
||||
14.5.14 Runtime Semantics: ClassDefinitionEvaluation
|
||||
|
||||
21. For each ClassElement m in order from methods
|
||||
a. If IsStatic of m is false, then
|
||||
i. Let status be the result of performing
|
||||
PropertyDefinitionEvaluation for m with arguments proto and
|
||||
false.
|
||||
[...]
|
||||
|
||||
Runtime Semantics: PropertyDefinitionEvaluation
|
||||
|
||||
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 arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
async * #method() {
|
||||
assert.sameValue(arguments.length, 2);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], null);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
new C().method(42, null,).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
|
@ -0,0 +1,73 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-single-args.case
|
||||
// - src/arguments/default/cls-decl-async-private-gen-meth.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using a single arg (static class declaration private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [async-iteration, class, class-methods-private]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
1. Let className be StringValue of BindingIdentifier.
|
||||
2. Let value be the result of ClassDefinitionEvaluation of ClassTail with
|
||||
argument className.
|
||||
[...]
|
||||
|
||||
14.5.14 Runtime Semantics: ClassDefinitionEvaluation
|
||||
|
||||
21. For each ClassElement m in order from methods
|
||||
a. If IsStatic of m is false, then
|
||||
i. Let status be the result of performing
|
||||
PropertyDefinitionEvaluation for m with arguments proto and
|
||||
false.
|
||||
[...]
|
||||
|
||||
Runtime Semantics: PropertyDefinitionEvaluation
|
||||
|
||||
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 arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
async * #method() {
|
||||
assert.sameValue(arguments.length, 1);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
new C().method(42,).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
|
@ -0,0 +1,78 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-spread-operator.case
|
||||
// - src/arguments/default/cls-decl-async-private-gen-meth.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using spread args (static class declaration private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [async-iteration, class, class-methods-private]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
1. Let className be StringValue of BindingIdentifier.
|
||||
2. Let value be the result of ClassDefinitionEvaluation of ClassTail with
|
||||
argument className.
|
||||
[...]
|
||||
|
||||
14.5.14 Runtime Semantics: ClassDefinitionEvaluation
|
||||
|
||||
21. For each ClassElement m in order from methods
|
||||
a. If IsStatic of m is false, then
|
||||
i. Let status be the result of performing
|
||||
PropertyDefinitionEvaluation for m with arguments proto and
|
||||
false.
|
||||
[...]
|
||||
|
||||
Runtime Semantics: PropertyDefinitionEvaluation
|
||||
|
||||
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 arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
var arr = [2, 3];
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
async * #method() {
|
||||
assert.sameValue(arguments.length, 4);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 1);
|
||||
assert.sameValue(arguments[2], 2);
|
||||
assert.sameValue(arguments[3], 3);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
new C().method(42, ...[1], ...arr,).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
|
@ -0,0 +1,74 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-undefined.case
|
||||
// - src/arguments/default/cls-decl-async-private-gen-meth.template
|
||||
/*---
|
||||
description: A trailing comma after undefined should not increase the arguments.length (static class declaration private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [async-iteration, class, class-methods-private]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
1. Let className be StringValue of BindingIdentifier.
|
||||
2. Let value be the result of ClassDefinitionEvaluation of ClassTail with
|
||||
argument className.
|
||||
[...]
|
||||
|
||||
14.5.14 Runtime Semantics: ClassDefinitionEvaluation
|
||||
|
||||
21. For each ClassElement m in order from methods
|
||||
a. If IsStatic of m is false, then
|
||||
i. Let status be the result of performing
|
||||
PropertyDefinitionEvaluation for m with arguments proto and
|
||||
false.
|
||||
[...]
|
||||
|
||||
Runtime Semantics: PropertyDefinitionEvaluation
|
||||
|
||||
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 arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
async * #method() {
|
||||
assert.sameValue(arguments.length, 2);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], undefined);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
new C().method(42, undefined,).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
|
@ -0,0 +1,55 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-multiple.case
|
||||
// - src/arguments/default/cls-decl-async-private-gen-meth-static.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using multiple args (static class expression private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [async-iteration, class, class-static-methods-private]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static async * #method() {
|
||||
assert.sameValue(arguments.length, 2);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 'TC39');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
static get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
C.method(42, 'TC39',).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
|
@ -0,0 +1,55 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-null.case
|
||||
// - src/arguments/default/cls-decl-async-private-gen-meth-static.template
|
||||
/*---
|
||||
description: A trailing comma after null should not increase the arguments.length (static class expression private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [async-iteration, class, class-static-methods-private]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static async * #method() {
|
||||
assert.sameValue(arguments.length, 2);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], null);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
static get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
C.method(42, null,).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
|
@ -0,0 +1,54 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-single-args.case
|
||||
// - src/arguments/default/cls-decl-async-private-gen-meth-static.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using a single arg (static class expression private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [async-iteration, class, class-static-methods-private]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static async * #method() {
|
||||
assert.sameValue(arguments.length, 1);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
static get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
C.method(42,).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
|
@ -0,0 +1,59 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-spread-operator.case
|
||||
// - src/arguments/default/cls-decl-async-private-gen-meth-static.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using spread args (static class expression private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [async-iteration, class, class-static-methods-private]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
var arr = [2, 3];
|
||||
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static async * #method() {
|
||||
assert.sameValue(arguments.length, 4);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 1);
|
||||
assert.sameValue(arguments[2], 2);
|
||||
assert.sameValue(arguments[3], 3);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
static get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
C.method(42, ...[1], ...arr,).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
|
@ -0,0 +1,55 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-undefined.case
|
||||
// - src/arguments/default/cls-decl-async-private-gen-meth-static.template
|
||||
/*---
|
||||
description: A trailing comma after undefined should not increase the arguments.length (static class expression private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [async-iteration, class, class-static-methods-private]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static async * #method() {
|
||||
assert.sameValue(arguments.length, 2);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], undefined);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
static get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
C.method(42, undefined,).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
|
@ -16,9 +16,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
|
|
|
@ -16,9 +16,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
|
|
|
@ -16,9 +16,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-spread-operator.case
|
||||
// - src/arguments/default/cls-decl-gen-meth.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using spread args (class declaration generator method)
|
||||
esid: sec-arguments-exotic-objects
|
||||
features: [generators]
|
||||
flags: [generated]
|
||||
info: |
|
||||
9.4.4 Arguments Exotic Objects
|
||||
|
||||
Most ECMAScript functions make an arguments object available to their code. Depending upon the
|
||||
characteristics of the function definition, its arguments object is either an ordinary object
|
||||
or an arguments exotic object.
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
var arr = [2, 3];
|
||||
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
*method() {
|
||||
assert.sameValue(arguments.length, 4);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 1);
|
||||
assert.sameValue(arguments[2], 2);
|
||||
assert.sameValue(arguments[3], 3);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
C.prototype.method(42, ...[1], ...arr,).next();
|
||||
|
||||
// Stores a reference `ref` for case evaluation
|
||||
var ref = C.prototype.method;
|
||||
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
|
@ -16,9 +16,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
|
|
|
@ -16,9 +16,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
|
|
|
@ -16,9 +16,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
|
|
|
@ -16,9 +16,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-spread-operator.case
|
||||
// - src/arguments/default/cls-decl-gen-meth-static.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using spread args (class declaration generator method)
|
||||
esid: sec-arguments-exotic-objects
|
||||
features: [generators]
|
||||
flags: [generated]
|
||||
info: |
|
||||
9.4.4 Arguments Exotic Objects
|
||||
|
||||
Most ECMAScript functions make an arguments object available to their code. Depending upon the
|
||||
characteristics of the function definition, its arguments object is either an ordinary object
|
||||
or an arguments exotic object.
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
var arr = [2, 3];
|
||||
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static *method() {
|
||||
assert.sameValue(arguments.length, 4);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 1);
|
||||
assert.sameValue(arguments[2], 2);
|
||||
assert.sameValue(arguments[3], 3);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
C.method(42, ...[1], ...arr,).next();
|
||||
|
||||
// Stores a reference `ref` for case evaluation
|
||||
var ref = C.method;
|
||||
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
|
@ -16,9 +16,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
|
|
|
@ -14,9 +14,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
|
|
|
@ -14,9 +14,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
|
|
|
@ -14,9 +14,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-spread-operator.case
|
||||
// - src/arguments/default/cls-decl-meth.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using spread args (class declaration method)
|
||||
esid: sec-arguments-exotic-objects
|
||||
flags: [generated]
|
||||
info: |
|
||||
9.4.4 Arguments Exotic Objects
|
||||
|
||||
Most ECMAScript functions make an arguments object available to their code. Depending upon the
|
||||
characteristics of the function definition, its arguments object is either an ordinary object
|
||||
or an arguments exotic object.
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
var arr = [2, 3];
|
||||
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
method() {
|
||||
assert.sameValue(arguments.length, 4);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 1);
|
||||
assert.sameValue(arguments[2], 2);
|
||||
assert.sameValue(arguments[3], 3);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
C.prototype.method(42, ...[1], ...arr,);
|
||||
|
||||
// Stores a reference `ref` for case evaluation
|
||||
var ref = C.prototype.method;
|
||||
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
|
@ -14,9 +14,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
|
|
|
@ -14,9 +14,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
|
|
|
@ -14,9 +14,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
|
|
|
@ -14,9 +14,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-spread-operator.case
|
||||
// - src/arguments/default/cls-decl-meth-static.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using spread args (static class declaration method)
|
||||
esid: sec-arguments-exotic-objects
|
||||
flags: [generated]
|
||||
info: |
|
||||
9.4.4 Arguments Exotic Objects
|
||||
|
||||
Most ECMAScript functions make an arguments object available to their code. Depending upon the
|
||||
characteristics of the function definition, its arguments object is either an ordinary object
|
||||
or an arguments exotic object.
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
var arr = [2, 3];
|
||||
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static method() {
|
||||
assert.sameValue(arguments.length, 4);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 1);
|
||||
assert.sameValue(arguments[2], 2);
|
||||
assert.sameValue(arguments[3], 3);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
}
|
||||
|
||||
C.method(42, ...[1], ...arr,);
|
||||
|
||||
// Stores a reference `ref` for case evaluation
|
||||
var ref = C.method;
|
||||
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
|
@ -14,9 +14,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-multiple.case
|
||||
// - src/arguments/default/cls-decl-private-gen-meth.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using multiple args (class declaration private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [generators, class, class-methods-private]
|
||||
flags: [generated]
|
||||
info: |
|
||||
9.4.4 Arguments Exotic Objects
|
||||
|
||||
Most ECMAScript functions make an arguments object available to their code. Depending upon the
|
||||
characteristics of the function definition, its arguments object is either an ordinary object
|
||||
or an arguments exotic object.
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
* #method() {
|
||||
assert.sameValue(arguments.length, 2);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 'TC39');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
new C().method(42, 'TC39',).next();
|
||||
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
|
@ -0,0 +1,50 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-null.case
|
||||
// - src/arguments/default/cls-decl-private-gen-meth.template
|
||||
/*---
|
||||
description: A trailing comma after null should not increase the arguments.length (class declaration private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [generators, class, class-methods-private]
|
||||
flags: [generated]
|
||||
info: |
|
||||
9.4.4 Arguments Exotic Objects
|
||||
|
||||
Most ECMAScript functions make an arguments object available to their code. Depending upon the
|
||||
characteristics of the function definition, its arguments object is either an ordinary object
|
||||
or an arguments exotic object.
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
* #method() {
|
||||
assert.sameValue(arguments.length, 2);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], null);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
new C().method(42, null,).next();
|
||||
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
|
@ -0,0 +1,49 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-single-args.case
|
||||
// - src/arguments/default/cls-decl-private-gen-meth.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using a single arg (class declaration private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [generators, class, class-methods-private]
|
||||
flags: [generated]
|
||||
info: |
|
||||
9.4.4 Arguments Exotic Objects
|
||||
|
||||
Most ECMAScript functions make an arguments object available to their code. Depending upon the
|
||||
characteristics of the function definition, its arguments object is either an ordinary object
|
||||
or an arguments exotic object.
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
* #method() {
|
||||
assert.sameValue(arguments.length, 1);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
new C().method(42,).next();
|
||||
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
|
@ -0,0 +1,54 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-spread-operator.case
|
||||
// - src/arguments/default/cls-decl-private-gen-meth.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using spread args (class declaration private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [generators, class, class-methods-private]
|
||||
flags: [generated]
|
||||
info: |
|
||||
9.4.4 Arguments Exotic Objects
|
||||
|
||||
Most ECMAScript functions make an arguments object available to their code. Depending upon the
|
||||
characteristics of the function definition, its arguments object is either an ordinary object
|
||||
or an arguments exotic object.
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
var arr = [2, 3];
|
||||
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
* #method() {
|
||||
assert.sameValue(arguments.length, 4);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 1);
|
||||
assert.sameValue(arguments[2], 2);
|
||||
assert.sameValue(arguments[3], 3);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
new C().method(42, ...[1], ...arr,).next();
|
||||
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
|
@ -0,0 +1,50 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-undefined.case
|
||||
// - src/arguments/default/cls-decl-private-gen-meth.template
|
||||
/*---
|
||||
description: A trailing comma after undefined should not increase the arguments.length (class declaration private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [generators, class, class-methods-private]
|
||||
flags: [generated]
|
||||
info: |
|
||||
9.4.4 Arguments Exotic Objects
|
||||
|
||||
Most ECMAScript functions make an arguments object available to their code. Depending upon the
|
||||
characteristics of the function definition, its arguments object is either an ordinary object
|
||||
or an arguments exotic object.
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
* #method() {
|
||||
assert.sameValue(arguments.length, 2);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], undefined);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
new C().method(42, undefined,).next();
|
||||
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
|
@ -0,0 +1,50 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-multiple.case
|
||||
// - src/arguments/default/cls-decl-private-gen-meth-static.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using multiple args (class declaration private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [generators, class, class-static-methods-private]
|
||||
flags: [generated]
|
||||
info: |
|
||||
9.4.4 Arguments Exotic Objects
|
||||
|
||||
Most ECMAScript functions make an arguments object available to their code. Depending upon the
|
||||
characteristics of the function definition, its arguments object is either an ordinary object
|
||||
or an arguments exotic object.
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static * #method() {
|
||||
assert.sameValue(arguments.length, 2);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 'TC39');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
static get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
C.method(42, 'TC39',).next();
|
||||
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
|
@ -0,0 +1,50 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-null.case
|
||||
// - src/arguments/default/cls-decl-private-gen-meth-static.template
|
||||
/*---
|
||||
description: A trailing comma after null should not increase the arguments.length (class declaration private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [generators, class, class-static-methods-private]
|
||||
flags: [generated]
|
||||
info: |
|
||||
9.4.4 Arguments Exotic Objects
|
||||
|
||||
Most ECMAScript functions make an arguments object available to their code. Depending upon the
|
||||
characteristics of the function definition, its arguments object is either an ordinary object
|
||||
or an arguments exotic object.
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static * #method() {
|
||||
assert.sameValue(arguments.length, 2);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], null);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
static get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
C.method(42, null,).next();
|
||||
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
|
@ -0,0 +1,49 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-single-args.case
|
||||
// - src/arguments/default/cls-decl-private-gen-meth-static.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using a single arg (class declaration private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [generators, class, class-static-methods-private]
|
||||
flags: [generated]
|
||||
info: |
|
||||
9.4.4 Arguments Exotic Objects
|
||||
|
||||
Most ECMAScript functions make an arguments object available to their code. Depending upon the
|
||||
characteristics of the function definition, its arguments object is either an ordinary object
|
||||
or an arguments exotic object.
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static * #method() {
|
||||
assert.sameValue(arguments.length, 1);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
static get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
C.method(42,).next();
|
||||
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
|
@ -0,0 +1,54 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-spread-operator.case
|
||||
// - src/arguments/default/cls-decl-private-gen-meth-static.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using spread args (class declaration private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [generators, class, class-static-methods-private]
|
||||
flags: [generated]
|
||||
info: |
|
||||
9.4.4 Arguments Exotic Objects
|
||||
|
||||
Most ECMAScript functions make an arguments object available to their code. Depending upon the
|
||||
characteristics of the function definition, its arguments object is either an ordinary object
|
||||
or an arguments exotic object.
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
var arr = [2, 3];
|
||||
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static * #method() {
|
||||
assert.sameValue(arguments.length, 4);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 1);
|
||||
assert.sameValue(arguments[2], 2);
|
||||
assert.sameValue(arguments[3], 3);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
static get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
C.method(42, ...[1], ...arr,).next();
|
||||
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
|
@ -0,0 +1,50 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-undefined.case
|
||||
// - src/arguments/default/cls-decl-private-gen-meth-static.template
|
||||
/*---
|
||||
description: A trailing comma after undefined should not increase the arguments.length (class declaration private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [generators, class, class-static-methods-private]
|
||||
flags: [generated]
|
||||
info: |
|
||||
9.4.4 Arguments Exotic Objects
|
||||
|
||||
Most ECMAScript functions make an arguments object available to their code. Depending upon the
|
||||
characteristics of the function definition, its arguments object is either an ordinary object
|
||||
or an arguments exotic object.
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static * #method() {
|
||||
assert.sameValue(arguments.length, 2);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], undefined);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
static get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
C.method(42, undefined,).next();
|
||||
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
|
@ -0,0 +1,50 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-multiple.case
|
||||
// - src/arguments/default/cls-decl-private-meth.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using multiple args (class declaration private method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [class, class-methods-private]
|
||||
flags: [generated]
|
||||
info: |
|
||||
9.4.4 Arguments Exotic Objects
|
||||
|
||||
Most ECMAScript functions make an arguments object available to their code. Depending upon the
|
||||
characteristics of the function definition, its arguments object is either an ordinary object
|
||||
or an arguments exotic object.
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
#method() {
|
||||
assert.sameValue(arguments.length, 2);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 'TC39');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
new C().method(42, 'TC39',);
|
||||
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
|
@ -0,0 +1,50 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-null.case
|
||||
// - src/arguments/default/cls-decl-private-meth.template
|
||||
/*---
|
||||
description: A trailing comma after null should not increase the arguments.length (class declaration private method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [class, class-methods-private]
|
||||
flags: [generated]
|
||||
info: |
|
||||
9.4.4 Arguments Exotic Objects
|
||||
|
||||
Most ECMAScript functions make an arguments object available to their code. Depending upon the
|
||||
characteristics of the function definition, its arguments object is either an ordinary object
|
||||
or an arguments exotic object.
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
#method() {
|
||||
assert.sameValue(arguments.length, 2);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], null);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
new C().method(42, null,);
|
||||
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
|
@ -0,0 +1,49 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-single-args.case
|
||||
// - src/arguments/default/cls-decl-private-meth.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using a single arg (class declaration private method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [class, class-methods-private]
|
||||
flags: [generated]
|
||||
info: |
|
||||
9.4.4 Arguments Exotic Objects
|
||||
|
||||
Most ECMAScript functions make an arguments object available to their code. Depending upon the
|
||||
characteristics of the function definition, its arguments object is either an ordinary object
|
||||
or an arguments exotic object.
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
#method() {
|
||||
assert.sameValue(arguments.length, 1);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
new C().method(42,);
|
||||
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
|
@ -0,0 +1,54 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-spread-operator.case
|
||||
// - src/arguments/default/cls-decl-private-meth.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using spread args (class declaration private method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [class, class-methods-private]
|
||||
flags: [generated]
|
||||
info: |
|
||||
9.4.4 Arguments Exotic Objects
|
||||
|
||||
Most ECMAScript functions make an arguments object available to their code. Depending upon the
|
||||
characteristics of the function definition, its arguments object is either an ordinary object
|
||||
or an arguments exotic object.
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
var arr = [2, 3];
|
||||
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
#method() {
|
||||
assert.sameValue(arguments.length, 4);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 1);
|
||||
assert.sameValue(arguments[2], 2);
|
||||
assert.sameValue(arguments[3], 3);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
new C().method(42, ...[1], ...arr,);
|
||||
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
|
@ -0,0 +1,50 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-undefined.case
|
||||
// - src/arguments/default/cls-decl-private-meth.template
|
||||
/*---
|
||||
description: A trailing comma after undefined should not increase the arguments.length (class declaration private method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [class, class-methods-private]
|
||||
flags: [generated]
|
||||
info: |
|
||||
9.4.4 Arguments Exotic Objects
|
||||
|
||||
Most ECMAScript functions make an arguments object available to their code. Depending upon the
|
||||
characteristics of the function definition, its arguments object is either an ordinary object
|
||||
or an arguments exotic object.
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
#method() {
|
||||
assert.sameValue(arguments.length, 2);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], undefined);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
new C().method(42, undefined,);
|
||||
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
|
@ -0,0 +1,50 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-multiple.case
|
||||
// - src/arguments/default/cls-decl-private-meth-static.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using multiple args (static class declaration private method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [class, class-static-methods-private]
|
||||
flags: [generated]
|
||||
info: |
|
||||
9.4.4 Arguments Exotic Objects
|
||||
|
||||
Most ECMAScript functions make an arguments object available to their code. Depending upon the
|
||||
characteristics of the function definition, its arguments object is either an ordinary object
|
||||
or an arguments exotic object.
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static #method() {
|
||||
assert.sameValue(arguments.length, 2);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 'TC39');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
static get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
C.method(42, 'TC39',);
|
||||
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
|
@ -0,0 +1,50 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-null.case
|
||||
// - src/arguments/default/cls-decl-private-meth-static.template
|
||||
/*---
|
||||
description: A trailing comma after null should not increase the arguments.length (static class declaration private method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [class, class-static-methods-private]
|
||||
flags: [generated]
|
||||
info: |
|
||||
9.4.4 Arguments Exotic Objects
|
||||
|
||||
Most ECMAScript functions make an arguments object available to their code. Depending upon the
|
||||
characteristics of the function definition, its arguments object is either an ordinary object
|
||||
or an arguments exotic object.
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static #method() {
|
||||
assert.sameValue(arguments.length, 2);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], null);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
static get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
C.method(42, null,);
|
||||
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
|
@ -0,0 +1,49 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-single-args.case
|
||||
// - src/arguments/default/cls-decl-private-meth-static.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using a single arg (static class declaration private method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [class, class-static-methods-private]
|
||||
flags: [generated]
|
||||
info: |
|
||||
9.4.4 Arguments Exotic Objects
|
||||
|
||||
Most ECMAScript functions make an arguments object available to their code. Depending upon the
|
||||
characteristics of the function definition, its arguments object is either an ordinary object
|
||||
or an arguments exotic object.
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static #method() {
|
||||
assert.sameValue(arguments.length, 1);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
static get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
C.method(42,);
|
||||
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
|
@ -0,0 +1,54 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-spread-operator.case
|
||||
// - src/arguments/default/cls-decl-private-meth-static.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using spread args (static class declaration private method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [class, class-static-methods-private]
|
||||
flags: [generated]
|
||||
info: |
|
||||
9.4.4 Arguments Exotic Objects
|
||||
|
||||
Most ECMAScript functions make an arguments object available to their code. Depending upon the
|
||||
characteristics of the function definition, its arguments object is either an ordinary object
|
||||
or an arguments exotic object.
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
var arr = [2, 3];
|
||||
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static #method() {
|
||||
assert.sameValue(arguments.length, 4);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 1);
|
||||
assert.sameValue(arguments[2], 2);
|
||||
assert.sameValue(arguments[3], 3);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
static get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
C.method(42, ...[1], ...arr,);
|
||||
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
|
@ -0,0 +1,50 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-undefined.case
|
||||
// - src/arguments/default/cls-decl-private-meth-static.template
|
||||
/*---
|
||||
description: A trailing comma after undefined should not increase the arguments.length (static class declaration private method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [class, class-static-methods-private]
|
||||
flags: [generated]
|
||||
info: |
|
||||
9.4.4 Arguments Exotic Objects
|
||||
|
||||
Most ECMAScript functions make an arguments object available to their code. Depending upon the
|
||||
characteristics of the function definition, its arguments object is either an ordinary object
|
||||
or an arguments exotic object.
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
static #method() {
|
||||
assert.sameValue(arguments.length, 2);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], undefined);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
static get method() {
|
||||
return this.#method;
|
||||
}
|
||||
}
|
||||
|
||||
C.method(42, undefined,);
|
||||
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
|
@ -18,9 +18,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
|
@ -18,9 +18,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
|
@ -18,9 +18,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-spread-operator.case
|
||||
// - src/arguments/default/async-gen-func-expr.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using spread args (async generator function expression)
|
||||
esid: sec-asyncgenerator-definitions-evaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
AsyncGeneratorExpression : async [no LineTerminator here] function * ( FormalParameters ) {
|
||||
AsyncGeneratorBody }
|
||||
|
||||
[...]
|
||||
3. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
|
||||
AsyncGeneratorBody, scope, strict).
|
||||
[...]
|
||||
|
||||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
var arr = [2, 3];
|
||||
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
// Stores a reference `ref` for case evaluation
|
||||
var ref;
|
||||
ref = async function*() {
|
||||
assert.sameValue(arguments.length, 4);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 1);
|
||||
assert.sameValue(arguments[2], 2);
|
||||
assert.sameValue(arguments[3], 3);
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
ref(42, ...[1], ...arr,).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'generator function invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
|
@ -18,9 +18,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
|
@ -42,9 +42,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
|
@ -42,9 +42,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
|
@ -42,9 +42,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-spread-operator.case
|
||||
// - src/arguments/default/cls-expr-async-gen-meth.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using spread args (class expression async generator method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
1. If BindingIdentifieropt is not present, let className be undefined.
|
||||
2. Else, let className be StringValue of BindingIdentifier.
|
||||
3. Let value be the result of ClassDefinitionEvaluation of ClassTail
|
||||
with argument className.
|
||||
[...]
|
||||
|
||||
14.5.14 Runtime Semantics: ClassDefinitionEvaluation
|
||||
|
||||
21. For each ClassElement m in order from methods
|
||||
a. If IsStatic of m is false, then
|
||||
i. Let status be the result of performing
|
||||
PropertyDefinitionEvaluation for m with arguments proto and
|
||||
false.
|
||||
[...]
|
||||
|
||||
Runtime Semantics: PropertyDefinitionEvaluation
|
||||
|
||||
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 arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
var arr = [2, 3];
|
||||
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
async *method() {
|
||||
assert.sameValue(arguments.length, 4);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 1);
|
||||
assert.sameValue(arguments[2], 2);
|
||||
assert.sameValue(arguments[3], 3);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
// Stores a reference `ref` for case evaluation
|
||||
var ref = C.prototype.method;
|
||||
|
||||
ref(42, ...[1], ...arr,).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
||||
|
|
@ -42,9 +42,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
|
@ -42,9 +42,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
|
@ -42,9 +42,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
|
@ -42,9 +42,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-spread-operator.case
|
||||
// - src/arguments/default/cls-expr-async-gen-meth-static.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using spread args (static class expression async generator method)
|
||||
esid: sec-class-definitions-runtime-semantics-evaluation
|
||||
features: [async-iteration]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
1. If BindingIdentifieropt is not present, let className be undefined.
|
||||
2. Else, let className be StringValue of BindingIdentifier.
|
||||
3. Let value be the result of ClassDefinitionEvaluation of ClassTail
|
||||
with argument className.
|
||||
[...]
|
||||
|
||||
14.5.14 Runtime Semantics: ClassDefinitionEvaluation
|
||||
|
||||
21. For each ClassElement m in order from methods
|
||||
a. If IsStatic of m is false, then
|
||||
b. Else,
|
||||
Let status be the result of performing PropertyDefinitionEvaluation
|
||||
for m with arguments F and false.
|
||||
[...]
|
||||
|
||||
Runtime Semantics: PropertyDefinitionEvaluation
|
||||
|
||||
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 arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
var arr = [2, 3];
|
||||
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
static async *method() {
|
||||
assert.sameValue(arguments.length, 4);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 1);
|
||||
assert.sameValue(arguments[2], 2);
|
||||
assert.sameValue(arguments[3], 3);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
||||
// Stores a reference `ref` for case evaluation
|
||||
var ref = C.method;
|
||||
|
||||
ref(42, ...[1], ...arr,).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
|
@ -42,9 +42,18 @@ info: |
|
|||
|
||||
Trailing comma in the arguments list
|
||||
|
||||
12.3 Left-Hand-Side Expressions
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , )
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-multiple.case
|
||||
// - src/arguments/default/cls-expr-async-private-gen-meth.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using multiple args (class expression async private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [async-iteration, class, class-methods-private]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
1. If BindingIdentifieropt is not present, let className be undefined.
|
||||
2. Else, let className be StringValue of BindingIdentifier.
|
||||
3. Let value be the result of ClassDefinitionEvaluation of ClassTail
|
||||
with argument className.
|
||||
[...]
|
||||
|
||||
14.5.14 Runtime Semantics: ClassDefinitionEvaluation
|
||||
|
||||
21. For each ClassElement m in order from methods
|
||||
a. If IsStatic of m is false, then
|
||||
i. Let status be the result of performing
|
||||
PropertyDefinitionEvaluation for m with arguments proto and
|
||||
false.
|
||||
[...]
|
||||
|
||||
Runtime Semantics: PropertyDefinitionEvaluation
|
||||
|
||||
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 arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
async * #method() {
|
||||
assert.sameValue(arguments.length, 2);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 'TC39');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
get method() {
|
||||
return this.#method;
|
||||
}
|
||||
};
|
||||
|
||||
new C().method(42, 'TC39',).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-null.case
|
||||
// - src/arguments/default/cls-expr-async-private-gen-meth.template
|
||||
/*---
|
||||
description: A trailing comma after null should not increase the arguments.length (class expression async private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [async-iteration, class, class-methods-private]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
1. If BindingIdentifieropt is not present, let className be undefined.
|
||||
2. Else, let className be StringValue of BindingIdentifier.
|
||||
3. Let value be the result of ClassDefinitionEvaluation of ClassTail
|
||||
with argument className.
|
||||
[...]
|
||||
|
||||
14.5.14 Runtime Semantics: ClassDefinitionEvaluation
|
||||
|
||||
21. For each ClassElement m in order from methods
|
||||
a. If IsStatic of m is false, then
|
||||
i. Let status be the result of performing
|
||||
PropertyDefinitionEvaluation for m with arguments proto and
|
||||
false.
|
||||
[...]
|
||||
|
||||
Runtime Semantics: PropertyDefinitionEvaluation
|
||||
|
||||
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 arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
async * #method() {
|
||||
assert.sameValue(arguments.length, 2);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], null);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
get method() {
|
||||
return this.#method;
|
||||
}
|
||||
};
|
||||
|
||||
new C().method(42, null,).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-single-args.case
|
||||
// - src/arguments/default/cls-expr-async-private-gen-meth.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using a single arg (class expression async private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [async-iteration, class, class-methods-private]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
1. If BindingIdentifieropt is not present, let className be undefined.
|
||||
2. Else, let className be StringValue of BindingIdentifier.
|
||||
3. Let value be the result of ClassDefinitionEvaluation of ClassTail
|
||||
with argument className.
|
||||
[...]
|
||||
|
||||
14.5.14 Runtime Semantics: ClassDefinitionEvaluation
|
||||
|
||||
21. For each ClassElement m in order from methods
|
||||
a. If IsStatic of m is false, then
|
||||
i. Let status be the result of performing
|
||||
PropertyDefinitionEvaluation for m with arguments proto and
|
||||
false.
|
||||
[...]
|
||||
|
||||
Runtime Semantics: PropertyDefinitionEvaluation
|
||||
|
||||
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 arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
async * #method() {
|
||||
assert.sameValue(arguments.length, 1);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
get method() {
|
||||
return this.#method;
|
||||
}
|
||||
};
|
||||
|
||||
new C().method(42,).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-spread-operator.case
|
||||
// - src/arguments/default/cls-expr-async-private-gen-meth.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using spread args (class expression async private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [async-iteration, class, class-methods-private]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
1. If BindingIdentifieropt is not present, let className be undefined.
|
||||
2. Else, let className be StringValue of BindingIdentifier.
|
||||
3. Let value be the result of ClassDefinitionEvaluation of ClassTail
|
||||
with argument className.
|
||||
[...]
|
||||
|
||||
14.5.14 Runtime Semantics: ClassDefinitionEvaluation
|
||||
|
||||
21. For each ClassElement m in order from methods
|
||||
a. If IsStatic of m is false, then
|
||||
i. Let status be the result of performing
|
||||
PropertyDefinitionEvaluation for m with arguments proto and
|
||||
false.
|
||||
[...]
|
||||
|
||||
Runtime Semantics: PropertyDefinitionEvaluation
|
||||
|
||||
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 arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
var arr = [2, 3];
|
||||
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
async * #method() {
|
||||
assert.sameValue(arguments.length, 4);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 1);
|
||||
assert.sameValue(arguments[2], 2);
|
||||
assert.sameValue(arguments[3], 3);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
get method() {
|
||||
return this.#method;
|
||||
}
|
||||
};
|
||||
|
||||
new C().method(42, ...[1], ...arr,).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-undefined.case
|
||||
// - src/arguments/default/cls-expr-async-private-gen-meth.template
|
||||
/*---
|
||||
description: A trailing comma after undefined should not increase the arguments.length (class expression async private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [async-iteration, class, class-methods-private]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
1. If BindingIdentifieropt is not present, let className be undefined.
|
||||
2. Else, let className be StringValue of BindingIdentifier.
|
||||
3. Let value be the result of ClassDefinitionEvaluation of ClassTail
|
||||
with argument className.
|
||||
[...]
|
||||
|
||||
14.5.14 Runtime Semantics: ClassDefinitionEvaluation
|
||||
|
||||
21. For each ClassElement m in order from methods
|
||||
a. If IsStatic of m is false, then
|
||||
i. Let status be the result of performing
|
||||
PropertyDefinitionEvaluation for m with arguments proto and
|
||||
false.
|
||||
[...]
|
||||
|
||||
Runtime Semantics: PropertyDefinitionEvaluation
|
||||
|
||||
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 arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
async * #method() {
|
||||
assert.sameValue(arguments.length, 2);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], undefined);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
get method() {
|
||||
return this.#method;
|
||||
}
|
||||
};
|
||||
|
||||
new C().method(42, undefined,).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-multiple.case
|
||||
// - src/arguments/default/cls-expr-async-private-gen-meth-static.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using multiple args (static class expression async private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [async-iteration, class, class-static-methods-private]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
1. If BindingIdentifieropt is not present, let className be undefined.
|
||||
2. Else, let className be StringValue of BindingIdentifier.
|
||||
3. Let value be the result of ClassDefinitionEvaluation of ClassTail
|
||||
with argument className.
|
||||
[...]
|
||||
|
||||
14.5.14 Runtime Semantics: ClassDefinitionEvaluation
|
||||
|
||||
21. For each ClassElement m in order from methods
|
||||
a. If IsStatic of m is false, then
|
||||
b. Else,
|
||||
Let status be the result of performing PropertyDefinitionEvaluation
|
||||
for m with arguments F and false.
|
||||
[...]
|
||||
|
||||
Runtime Semantics: PropertyDefinitionEvaluation
|
||||
|
||||
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 arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
static async * #method() {
|
||||
assert.sameValue(arguments.length, 2);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 'TC39');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
static get method() {
|
||||
return this.#method;
|
||||
}
|
||||
};
|
||||
|
||||
C.method(42, 'TC39',).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
|
@ -0,0 +1,76 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-null.case
|
||||
// - src/arguments/default/cls-expr-async-private-gen-meth-static.template
|
||||
/*---
|
||||
description: A trailing comma after null should not increase the arguments.length (static class expression async private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [async-iteration, class, class-static-methods-private]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
1. If BindingIdentifieropt is not present, let className be undefined.
|
||||
2. Else, let className be StringValue of BindingIdentifier.
|
||||
3. Let value be the result of ClassDefinitionEvaluation of ClassTail
|
||||
with argument className.
|
||||
[...]
|
||||
|
||||
14.5.14 Runtime Semantics: ClassDefinitionEvaluation
|
||||
|
||||
21. For each ClassElement m in order from methods
|
||||
a. If IsStatic of m is false, then
|
||||
b. Else,
|
||||
Let status be the result of performing PropertyDefinitionEvaluation
|
||||
for m with arguments F and false.
|
||||
[...]
|
||||
|
||||
Runtime Semantics: PropertyDefinitionEvaluation
|
||||
|
||||
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 arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
static async * #method() {
|
||||
assert.sameValue(arguments.length, 2);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], null);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
static get method() {
|
||||
return this.#method;
|
||||
}
|
||||
};
|
||||
|
||||
C.method(42, null,).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
|
@ -0,0 +1,75 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-single-args.case
|
||||
// - src/arguments/default/cls-expr-async-private-gen-meth-static.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using a single arg (static class expression async private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [async-iteration, class, class-static-methods-private]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
1. If BindingIdentifieropt is not present, let className be undefined.
|
||||
2. Else, let className be StringValue of BindingIdentifier.
|
||||
3. Let value be the result of ClassDefinitionEvaluation of ClassTail
|
||||
with argument className.
|
||||
[...]
|
||||
|
||||
14.5.14 Runtime Semantics: ClassDefinitionEvaluation
|
||||
|
||||
21. For each ClassElement m in order from methods
|
||||
a. If IsStatic of m is false, then
|
||||
b. Else,
|
||||
Let status be the result of performing PropertyDefinitionEvaluation
|
||||
for m with arguments F and false.
|
||||
[...]
|
||||
|
||||
Runtime Semantics: PropertyDefinitionEvaluation
|
||||
|
||||
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 arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
static async * #method() {
|
||||
assert.sameValue(arguments.length, 1);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
static get method() {
|
||||
return this.#method;
|
||||
}
|
||||
};
|
||||
|
||||
C.method(42,).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
|
@ -0,0 +1,80 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-spread-operator.case
|
||||
// - src/arguments/default/cls-expr-async-private-gen-meth-static.template
|
||||
/*---
|
||||
description: A trailing comma should not increase the arguments.length, using spread args (static class expression async private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [async-iteration, class, class-static-methods-private]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
1. If BindingIdentifieropt is not present, let className be undefined.
|
||||
2. Else, let className be StringValue of BindingIdentifier.
|
||||
3. Let value be the result of ClassDefinitionEvaluation of ClassTail
|
||||
with argument className.
|
||||
[...]
|
||||
|
||||
14.5.14 Runtime Semantics: ClassDefinitionEvaluation
|
||||
|
||||
21. For each ClassElement m in order from methods
|
||||
a. If IsStatic of m is false, then
|
||||
b. Else,
|
||||
Let status be the result of performing PropertyDefinitionEvaluation
|
||||
for m with arguments F and false.
|
||||
[...]
|
||||
|
||||
Runtime Semantics: PropertyDefinitionEvaluation
|
||||
|
||||
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 arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
var arr = [2, 3];
|
||||
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
static async * #method() {
|
||||
assert.sameValue(arguments.length, 4);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], 1);
|
||||
assert.sameValue(arguments[2], 2);
|
||||
assert.sameValue(arguments[3], 3);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
static get method() {
|
||||
return this.#method;
|
||||
}
|
||||
};
|
||||
|
||||
C.method(42, ...[1], ...arr,).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
|
@ -0,0 +1,76 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/arguments/args-trailing-comma-undefined.case
|
||||
// - src/arguments/default/cls-expr-async-private-gen-meth-static.template
|
||||
/*---
|
||||
description: A trailing comma after undefined should not increase the arguments.length (static class expression async private generator method)
|
||||
esid: sec-argument-lists-runtime-semantics-argumentlistevaluation
|
||||
features: [async-iteration, class, class-static-methods-private]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
1. If BindingIdentifieropt is not present, let className be undefined.
|
||||
2. Else, let className be StringValue of BindingIdentifier.
|
||||
3. Let value be the result of ClassDefinitionEvaluation of ClassTail
|
||||
with argument className.
|
||||
[...]
|
||||
|
||||
14.5.14 Runtime Semantics: ClassDefinitionEvaluation
|
||||
|
||||
21. For each ClassElement m in order from methods
|
||||
a. If IsStatic of m is false, then
|
||||
b. Else,
|
||||
Let status be the result of performing PropertyDefinitionEvaluation
|
||||
for m with arguments F and false.
|
||||
[...]
|
||||
|
||||
Runtime Semantics: PropertyDefinitionEvaluation
|
||||
|
||||
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 arguments list
|
||||
|
||||
Left-Hand-Side Expressions
|
||||
|
||||
Arguments :
|
||||
( )
|
||||
( ArgumentList )
|
||||
( ArgumentList , )
|
||||
|
||||
ArgumentList :
|
||||
AssignmentExpression
|
||||
... AssignmentExpression
|
||||
ArgumentList , AssignmentExpression
|
||||
ArgumentList , ... AssignmentExpression
|
||||
---*/
|
||||
|
||||
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
static async * #method() {
|
||||
assert.sameValue(arguments.length, 2);
|
||||
assert.sameValue(arguments[0], 42);
|
||||
assert.sameValue(arguments[1], undefined);
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
|
||||
static get method() {
|
||||
return this.#method;
|
||||
}
|
||||
};
|
||||
|
||||
C.method(42, undefined,).next().then(() => {
|
||||
assert.sameValue(callCount, 1, 'method invoked exactly once');
|
||||
}).then($DONE, $DONE);
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue