@@ -2245,7 +2245,8 @@ \subsection{Formal Parameters}
22452245\Index{formal parameter list},
22462246which consists of a list of required positional parameters
22472247(\ref{requiredFormals}),
2248- followed by any optional and/or named parameters (\ref{optionalFormals}).
2248+ followed by any optional and/or named parameters
2249+ (\ref{optionalFormalsAndNamedFormals}).
22492250The latter may be specified
22502251either as a list of optional positional parameters,
22512252or as a set of named parameters,
@@ -2449,8 +2450,14 @@ \subsubsection{Required Formals}
24492450an instance method, instance setter, or instance operator.
24502451
24512452
2452- \subsubsection{Optional and Named Formals}
2453- \LMLabel{optionalFormals}
2453+ \subsubsection{Optional Formals and Named Formals}
2454+ \LMLabel{optionalFormalsAndNamedFormals}
2455+
2456+ \LMHash{}%
2457+ This section is concerned with optional parameters,
2458+ positional or named,
2459+ and with required named parameters.
2460+ They are handled together because they share grammar rules.
24542461
24552462\LMHash{}%
24562463Optional formal parameters may be specified and provided with default values.
@@ -2462,7 +2469,7 @@ \subsubsection{Optional and Named Formals}
24622469
24632470<defaultNamedParameter> ::= \gnewline{}
24642471 <metadata> \REQUIRED? <normalFormalParameterNoMetadata>
2465- \gnewline{} (`: ' <expression>)?
2472+ \gnewline{} (`= ' <expression>)?
24662473\end{grammar}
24672474
24682475\LMHash{}%
@@ -2480,7 +2487,7 @@ \subsubsection{Optional and Named Formals}
24802487\Error{compile-time error} if a required named parameter has a default value.
24812488
24822489\LMHash{}%
2483- Assume that $p$ is an optional named parameter with default value $d$.
2490+ Assume that $p$ is an optional parameter with default value $d$.
24842491It is a \Error{compile-time error}
24852492if the static type of $d$ is not assignable to the declared type of $p$.
24862493
0 commit comments