Debian Codegraph @

js/src/tests/test262/language/statements/async-function/dflt-params-duplicates.js

raw
1 // |reftest| error:SyntaxError
2 // This file was procedurally generated from the following sources:
3 // - src/function-forms/dflt-params-duplicates.case
4 // - src/function-forms/syntax/async-func-decl.template
5 /*---
6 description: It is a Syntax Error if BoundNames of FormalParameters contains any duplicate elements. (async function declaration)
7 esid: sec-async-function-definitions
8 features: [default-parameters, async-functions]
9 flags: [generated]
10 negative:
11 phase: parse
12 type: SyntaxError
13 info: |
14 14.6 Async Function Definitions
15
16 AsyncFunctionDeclaration :
17 async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
18
19
20 14.1.2 Static Semantics: Early Errors
21
22 StrictFormalParameters : FormalParameters
23
24 - It is a Syntax Error if BoundNames of FormalParameters contains any
25 duplicate elements.
26
27 FormalParameters : FormalParameterList
28
29 - It is a Syntax Error if IsSimpleParameterList of FormalParameterList is
30 false and BoundNames of FormalParameterList contains any duplicate
31 elements.
32
33 ---*/
34 $DONOTEVALUATE();
35
36
37 async function f(x = 0, x) {
38
39 }