15.1 Parameter Lists
Syntax
15.1.1 Static Semantics: Early Errors
-
It is a Syntax Error if
BoundNames ofFormalParameters contains any duplicate elements.
-
It is a Syntax Error if
IsSimpleParameterList ofFormalParameterList isfalse andBoundNames ofFormalParameterList contains any duplicate elements.
Multiple occurrences of the same
15.1.2 Static Semantics: ContainsExpression
The
- Return
false .
- Return
ContainsExpression ofBindingPropertyList .
- Return
false .
- Return
ContainsExpression ofBindingRestElement .
- Return
ContainsExpression ofBindingElementList .
- Let has be
ContainsExpression ofBindingElementList . - If has is
true , returntrue . - Return
ContainsExpression ofBindingRestElement .
- Let has be
ContainsExpression ofBindingPropertyList . - If has is
true , returntrue . - Return
ContainsExpression ofBindingProperty .
- Let has be
ContainsExpression ofBindingElementList . - If has is
true , returntrue . - Return
ContainsExpression ofBindingElisionElement .
- Return
ContainsExpression ofBindingElement .
- Let has be
IsComputedPropertyKey ofPropertyName . - If has is
true , returntrue . - Return
ContainsExpression ofBindingElement .
- Return
true .
- Return
false .
- Return
true .
- Return
false .
- Return
ContainsExpression ofBindingPattern .
- Return
false .
- If
ContainsExpression ofFormalParameterList istrue , returntrue . - Return
ContainsExpression ofFunctionRestParameter .
- If
ContainsExpression ofFormalParameterList istrue , returntrue . - Return
ContainsExpression ofFormalParameter .
- Return
false .
- Let formals be the
ArrowFormalParameters that iscovered byCoverParenthesizedExpressionAndArrowParameterList . - Return
ContainsExpression of formals.
- Return
false .
15.1.3 Static Semantics: IsSimpleParameterList
The
- Return
false .
- Return
false .
- Return
true .
- Return
false .
- Return
true .
- Return
false .
- Return
false .
- If
IsSimpleParameterList ofFormalParameterList isfalse , returnfalse . - Return
IsSimpleParameterList ofFormalParameter .
- Return
IsSimpleParameterList ofBindingElement .
- Return
true .
- Let formals be the
ArrowFormalParameters that iscovered byCoverParenthesizedExpressionAndArrowParameterList . - Return
IsSimpleParameterList of formals.
- Return
true .
- Let head be the
AsyncArrowHead that iscovered byCoverCallExpressionAndAsyncArrowHead . - Return
IsSimpleParameterList of head.
15.1.4 Static Semantics: HasInitializer
The
- Return
false .
- Return
true .
- Return
false .
- Return
true .
- If
HasInitializer ofFormalParameterList istrue , returntrue . - Return
HasInitializer ofFormalParameter .
15.1.5 Static Semantics: ExpectedArgumentCount
The
- Return 0.
- Return
ExpectedArgumentCount ofFormalParameterList .
The ExpectedArgumentCount of a
- If
HasInitializer ofFormalParameter istrue , return 0. - Return 1.
- Let count be
ExpectedArgumentCount ofFormalParameterList . - If
HasInitializer ofFormalParameterList istrue orHasInitializer ofFormalParameter istrue , return count. - Return count + 1.
- Return 1.
- Let formals be the
ArrowFormalParameters that iscovered byCoverParenthesizedExpressionAndArrowParameterList . - Return
ExpectedArgumentCount of formals.
- If
HasInitializer ofFormalParameter istrue , return 0. - Return 1.
- Return 1.