Debian Codegraph @

js/src/tests/test262/language/expressions/object/method-definition/gen-meth-dflt-params-rest.js

raw
1 // |reftest| error:SyntaxError
2 // This file was procedurally generated from the following sources:
3 // - src/function-forms/dflt-params-rest.case
4 // - src/function-forms/syntax/gen-meth.template
5 /*---
6 description: RestParameter does not support an initializer (generator method)
7 esid: sec-generator-function-definitions-runtime-semantics-propertydefinitionevaluation
8 features: [default-parameters, generators]
9 flags: [generated]
10 negative:
11 phase: parse
12 type: SyntaxError
13 info: |
14 GeneratorMethod :
15 * PropertyName ( StrictFormalParameters ) { GeneratorBody }
16
17 1. Let propKey be the result of evaluating PropertyName.
18 2. ReturnIfAbrupt(propKey).
19 3. If the function code for this GeneratorMethod is strict mode code,
20 let strict be true. Otherwise let strict be false.
21 4. Let scope be the running execution context's LexicalEnvironment.
22 5. Let closure be GeneratorFunctionCreate(Method,
23 StrictFormalParameters, GeneratorBody, scope, strict).
24 [...]
25
26 9.2.1 [[Call]] ( thisArgument, argumentsList)
27
28 [...]
29 7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
30 [...]
31
32 9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
33
34 1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
35 [...]
36
37 9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
38
39 [...]
40 23. Let iteratorRecord be Record {[[iterator]]:
41 CreateListIterator(argumentsList), [[done]]: false}.
42 24. If hasDuplicates is true, then
43 [...]
44 25. Else,
45 b. Let formalStatus be IteratorBindingInitialization for formals with
46 iteratorRecord and env as arguments.
47 [...]
48
49
50 14.1 Function Definitions
51
52 Syntax
53
54 FunctionRestParameter[Yield] :
55
56 BindingRestElement[?Yield]
57
58 13.3.3 Destructuring Binding Patterns
59
60 Syntax
61
62 BindingRestElement[Yield] :
63
64 ...BindingIdentifier[?Yield]
65 ...BindingPattern[?Yield]
66
67 ---*/
68 $DONOTEVALUATE();
69
70 0, {
71 *method(...x = []) {
72
73 }
74 };