@@ -2240,7 +2240,8 @@ \subsection{Formal Parameters}
22402240\Index{formal parameter list},
22412241which consists of a list of required positional parameters
22422242(\ref{requiredFormals}),
2243- followed by any optional and/or named parameters (\ref{optionalFormals}).
2243+ followed by any optional and/or named parameters
2244+ (\ref{optionalFormalsAndNamedFormals}).
22442245The latter may be specified
22452246either as a list of optional positional parameters,
22462247or as a set of named parameters,
@@ -2444,8 +2445,14 @@ \subsubsection{Required Formals}
24442445an instance method, instance setter, or instance operator.
24452446
24462447
2447- \subsubsection{Optional and Named Formals}
2448- \LMLabel{optionalFormals}
2448+ \subsubsection{Optional Formals and Named Formals}
2449+ \LMLabel{optionalFormalsAndNamedFormals}
2450+
2451+ \LMHash{}%
2452+ This section is concerned with optional parameters,
2453+ positional or named,
2454+ and with required named parameters.
2455+ They are handled together because they share grammar rules.
24492456
24502457\LMHash{}%
24512458Optional formal parameters may be specified and provided with default values.
@@ -2457,7 +2464,7 @@ \subsubsection{Optional and Named Formals}
24572464
24582465<defaultNamedParameter> ::= \gnewline{}
24592466 <metadata> \REQUIRED? <normalFormalParameterNoMetadata>
2460- \gnewline{} (`: ' <expression>)?
2467+ \gnewline{} (`= ' <expression>)?
24612468\end{grammar}
24622469
24632470\LMHash{}%
@@ -2475,7 +2482,7 @@ \subsubsection{Optional and Named Formals}
24752482\Error{compile-time error} if a required named parameter has a default value.
24762483
24772484\LMHash{}%
2478- Assume that $p$ is an optional named parameter with default value $d$.
2485+ Assume that $p$ is an optional parameter with default value $d$.
24792486It is a \Error{compile-time error}
24802487if the static type of $d$ is not assignable to the declared type of $p$.
24812488
0 commit comments