Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/class/gen-meth-static-dflt-params-rest.js

raw
1 // This file was procedurally generated from the following sources:
2 // - src/function-forms/dflt-params-rest.case
3 // - src/function-forms/syntax/cls-expr-gen-meth-static.template
4 /*---
5 description: RestParameter does not support an initializer (static class expression generator method)
6 esid: sec-class-definitions-runtime-semantics-evaluation
7 features: [default-parameters, generators]
8 flags: [generated]
9 negative:
10 phase: parse
11 type: SyntaxError
12 info: |
13 ClassExpression : class BindingIdentifieropt ClassTail
14
15 1. If BindingIdentifieropt is not present, let className be undefined.
16 2. Else, let className be StringValue of BindingIdentifier.
17 3. Let value be the result of ClassDefinitionEvaluation of ClassTail
18 with argument className.
19 [...]
20
21 14.5.14 Runtime Semantics: ClassDefinitionEvaluation
22
23 21. For each ClassElement m in order from methods
24 a. If IsStatic of m is false, then
25 b. Else,
26 Let status be the result of performing PropertyDefinitionEvaluation
27 for m with arguments F and false.
28 [...]
29
30 14.4.13 Runtime Semantics: PropertyDefinitionEvaluation
31
32 GeneratorMethod :
33 * PropertyName ( StrictFormalParameters ) { GeneratorBody }
34
35 1. Let propKey be the result of evaluating PropertyName.
36 2. ReturnIfAbrupt(propKey).
37 3. If the function code for this GeneratorMethod is strict mode code,
38 let strict be true. Otherwise let strict be false.
39 4. Let scope be the running execution context's LexicalEnvironment.
40 5. Let closure be GeneratorFunctionCreate(Method,
41 StrictFormalParameters, GeneratorBody, scope, strict).
42
43 9.2.1 [[Call]] ( thisArgument, argumentsList)
44
45 [...]
46 7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
47 [...]
48
49 9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
50
51 1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
52 [...]
53
54 9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
55
56 [...]
57 23. Let iteratorRecord be Record {[[iterator]]:
58 CreateListIterator(argumentsList), [[done]]: false}.
59 24. If hasDuplicates is true, then
60 [...]
61 25. Else,
62 b. Let formalStatus be IteratorBindingInitialization for formals with
63 iteratorRecord and env as arguments.
64 [...]
65
66
67 14.1 Function Definitions
68
69 Syntax
70
71 FunctionRestParameter[Yield] :
72
73 BindingRestElement[?Yield]
74
75 13.3.3 Destructuring Binding Patterns
76
77 Syntax
78
79 BindingRestElement[Yield] :
80
81 ...BindingIdentifier[?Yield]
82 ...BindingPattern[?Yield]
83
84 ---*/
85 throw "Test262: This statement should not be evaluated.";
86
87 0, class {
88 static *method(...x = []) {
89
90 }
91 };