@@ -2307,7 +2307,8 @@ \subsection{Formal Parameters}
23072307\Index{formal parameter list},
23082308which consists of a list of required positional parameters
23092309(\ref{requiredFormals}),
2310- followed by any optional and/or named parameters (\ref{optionalFormals}).
2310+ followed by any optional and/or named parameters
2311+ (\ref{optionalFormalsAndNamedFormals}).
23112312The latter may be specified
23122313either as a list of optional positional parameters,
23132314or as a set of named parameters,
@@ -2511,8 +2512,14 @@ \subsubsection{Required Formals}
25112512an instance method, instance setter, or instance operator.
25122513
25132514
2514- \subsubsection{Optional and Named Formals}
2515- \LMLabel{optionalFormals}
2515+ \subsubsection{Optional Formals and Named Formals}
2516+ \LMLabel{optionalFormalsAndNamedFormals}
2517+
2518+ \LMHash{}%
2519+ This section is concerned with optional parameters,
2520+ positional or named,
2521+ and with required named parameters.
2522+ They are handled together because they share grammar rules.
25162523
25172524\LMHash{}%
25182525Optional formal parameters may be specified and provided with default values.
@@ -2524,7 +2531,7 @@ \subsubsection{Optional and Named Formals}
25242531
25252532<defaultNamedParameter> ::= \gnewline{}
25262533 <metadata> \REQUIRED? <normalFormalParameterNoMetadata>
2527- \gnewline{} (`: ' <expression>)?
2534+ \gnewline{} (`= ' <expression>)?
25282535\end{grammar}
25292536
25302537\LMHash{}%
@@ -2542,7 +2549,7 @@ \subsubsection{Optional and Named Formals}
25422549\Error{compile-time error} if a required named parameter has a default value.
25432550
25442551\LMHash{}%
2545- Assume that $p$ is an optional named parameter with default value $d$.
2552+ Assume that $p$ is an optional parameter with default value $d$.
25462553It is a \Error{compile-time error}
25472554if the static type of $d$ is not assignable to the declared type of $p$.
25482555
0 commit comments