Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/object/method-definition/async-gen-meth-dflt-params-duplicates.js

raw
1 // This file was procedurally generated from the following sources:
2 // - src/function-forms/dflt-params-duplicates.case
3 // - src/function-forms/syntax/async-gen-meth.template
4 /*---
5 description: It is a Syntax Error if BoundNames of FormalParameters contains any duplicate elements. (async generator method)
6 esid: sec-asyncgenerator-definitions-propertydefinitionevaluation
7 features: [default-parameters, async-iteration]
8 flags: [generated]
9 negative:
10 phase: parse
11 type: SyntaxError
12 info: |
13 AsyncGeneratorMethod :
14 async [no LineTerminator here] * PropertyName ( UniqueFormalParameters )
15 { AsyncGeneratorBody }
16
17 1. Let propKey be the result of evaluating PropertyName.
18 2. ReturnIfAbrupt(propKey).
19 3. If the function code for this AsyncGeneratorMethod is strict mode code, let strict be true.
20 Otherwise let strict be false.
21 4. Let scope be the running execution context's LexicalEnvironment.
22 5. Let closure be ! AsyncGeneratorFunctionCreate(Method, UniqueFormalParameters,
23 AsyncGeneratorBody, scope, strict).
24 [...]
25
26
27 14.1.2 Static Semantics: Early Errors
28
29 StrictFormalParameters : FormalParameters
30
31 - It is a Syntax Error if BoundNames of FormalParameters contains any
32 duplicate elements.
33
34 FormalParameters : FormalParameterList
35
36 - It is a Syntax Error if IsSimpleParameterList of FormalParameterList is
37 false and BoundNames of FormalParameterList contains any duplicate
38 elements.
39
40 ---*/
41 throw "Test262: This statement should not be evaluated.";
42
43 0, {
44 async *method(x = 0, x) {
45
46 }
47 };