Debian Codegraph @

js/src/tests/test262/language/expressions/object/method-definition/async-gen-meth-object-destructuring-param-strict-body.js

raw
1 // |reftest| error:SyntaxError
2 // This file was procedurally generated from the following sources:
3 // - src/function-forms/object-destructuring-param-strict-body.case
4 // - src/function-forms/syntax/async-gen-meth.template
5 /*---
6 description: ObjectBindingPattern and Use Strict Directive are not allowed to coexist for the same function. (async generator method)
7 esid: sec-asyncgenerator-definitions-propertydefinitionevaluation
8 features: [rest-parameters, async-iteration]
9 flags: [generated]
10 negative:
11 phase: parse
12 type: SyntaxError
13 info: |
14 AsyncGeneratorMethod :
15 async [no LineTerminator here] * PropertyName ( UniqueFormalParameters )
16 { AsyncGeneratorBody }
17
18 1. Let propKey be the result of evaluating PropertyName.
19 2. ReturnIfAbrupt(propKey).
20 3. If the function code for this AsyncGeneratorMethod is strict mode code, let strict be true.
21 Otherwise let strict be false.
22 4. Let scope be the running execution context's LexicalEnvironment.
23 5. Let closure be ! AsyncGeneratorFunctionCreate(Method, UniqueFormalParameters,
24 AsyncGeneratorBody, scope, strict).
25 [...]
26
27
28 13.3.3.4 Static Semantics: IsSimpleParameterList
29
30 BindingElement : BindingPattern
31
32 1. Return false.
33
34 14.1.2 Static Semantics: Early Errors
35
36 FunctionDeclaration : function BindingIdentifier ( FormalParameters ) { FunctionBody }
37 FunctionDeclaration : function ( FormalParameters ) { FunctionBody }
38 FunctionExpression : function BindingIdentifier ( FormalParameters ) { FunctionBody }
39
40 - It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
41 IsSimpleParameterList of FormalParameters is false.
42
43 14.2.1 Static Semantics: Early Errors
44
45 ArrowFunction : ArrowParameters => ConciseBody
46
47 - It is a Syntax Error if ContainsUseStrict of ConciseBody is true and
48 IsSimpleParameterList of ArrowParameters is false.
49
50 14.3.1 Static Semantics: Early Errors
51
52 MethodDefinition : PropertyName ( UniqueFormalParameters ) { FunctionBody }
53
54 - It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
55 IsSimpleParameterList of UniqueFormalParameters is false.
56
57 MethodDefinition : set PropertyName ( PropertySetParameterList ) { FunctionBody }
58
59 - It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
60 IsSimpleParameterList of PropertySetParameterList is false.
61
62 14.4.1 Static Semantics: Early Errors
63
64 GeneratorMethod : * PropertyName ( UniqueFormalParameters ) { GeneratorBody }
65
66 - It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
67 IsSimpleParameterList of UniqueFormalParameters is false.
68
69 GeneratorDeclaration : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
70 GeneratorDeclaration : function * ( FormalParameters ) { GeneratorBody }
71 GeneratorExpression : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
72
73 - It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
74 IsSimpleParameterList of UniqueFormalParameters is false.
75
76 14.5.1 Static Semantics: Early Errors
77
78 AsyncGeneratorMethod : async * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
79
80 - It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
81 IsSimpleParameterList of UniqueFormalParameters is false.
82
83 AsyncGeneratorDeclaration : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
84 AsyncGeneratorDeclaration : async function * ( FormalParameters ) { AsyncGeneratorBody }
85 AsyncGeneratorExpression : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
86
87 - It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
88 IsSimpleParameterList of FormalParameters is false.
89
90 14.7.1 Static Semantics: Early Errors
91
92 AsyncMethod : async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
93
94 - It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
95 IsSimpleParameterList of UniqueFormalParameters is false.
96
97 AsyncFunctionDeclaration : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
98 AsyncFunctionDeclaration : async function ( FormalParameters ) { AsyncFunctionBody }
99 AsyncFunctionExpression : async function ( FormalParameters ) { AsyncFunctionBody }
100 AsyncFunctionExpression : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
101
102 - It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
103 IsSimpleParameterList of FormalParameters is false.
104
105 14.8.1 Static Semantics: Early Errors
106
107 AsyncArrowFunction : CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
108
109 - It is a Syntax Error if ContainsUseStrict of AsyncConciseBody is true and
110 IsSimpleParameterList of CoverCallExpressionAndAsyncArrowHead is false.
111
112 ---*/
113 $DONOTEVALUATE();
114
115 0, {
116 async *method({property}) {
117 "use strict";
118 }
119 };