File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -2442,17 +2442,9 @@ \subsubsection{Optional and Named Formals}
24422442
24432443<defaultNamedParameter> ::= \gnewline{}
24442444 <metadata> \REQUIRED? <normalFormalParameterNoMetadata>
2445- \gnewline{} ((`=' | `:') <expression>)?
2445+ \gnewline{} (`:' <expression>)?
24462446\end{grammar}
24472447
2448- \LMHash{}%
2449- The form \syntax{<normalFormalParameter> `:' <expression>}
2450- is equivalent to the form
2451- \syntax{<normalFormalParameter> `=' <expression>}.
2452- The colon-syntax is included only for backwards compatibility.
2453- It is deprecated and will be removed in
2454- a later version of the language specification.
2455-
24562448\LMHash{}%
24572449It is a \Error{compile-time error} if an optional or named formal parameter has
24582450the modifier \CONST{} or the modifier \LATE.
@@ -2467,6 +2459,11 @@ \subsubsection{Optional and Named Formals}
24672459It is a
24682460\Error{compile-time error} if a required named parameter has a default value.
24692461
2462+ \LMHash{}%
2463+ Assume that $p$ is an optional named parameter with default value $d$.
2464+ It is a \Error{compile-time error}
2465+ if the static type of $d$ is not assignable to the declared type of $p$.
2466+
24702467\LMHash{}%
24712468It is a \Error{compile-time error} if the name of a named optional parameter
24722469begins with an `_' character.
You can’t perform that action at this time.
0 commit comments