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 @@ -2288,17 +2288,9 @@ \subsubsection{Optional and Named Formals}
22882288
22892289<defaultNamedParameter> ::= \gnewline{}
22902290 <metadata> \REQUIRED? <normalFormalParameterNoMetadata>
2291- \gnewline{} ((`=' | `:') <expression>)?
2291+ \gnewline{} (`:' <expression>)?
22922292\end{grammar}
22932293
2294- \LMHash{}%
2295- The form \syntax{<normalFormalParameter> `:' <expression>}
2296- is equivalent to the form
2297- \syntax{<normalFormalParameter> `=' <expression>}.
2298- The colon-syntax is included only for backwards compatibility.
2299- It is deprecated and will be removed in
2300- a later version of the language specification.
2301-
23022294\LMHash{}%
23032295It is a \Error{compile-time error} if an optional or named formal parameter has
23042296the modifier \CONST{} or the modifier \LATE.
@@ -2313,6 +2305,11 @@ \subsubsection{Optional and Named Formals}
23132305It is a
23142306\Error{compile-time error} if a required named parameter has a default value.
23152307
2308+ \LMHash{}%
2309+ Assume that $p$ is an optional named parameter with default value $d$.
2310+ It is a \Error{compile-time error}
2311+ if the static type of $d$ is not assignable to the declared type of $p$.
2312+
23162313\LMHash{}%
23172314It is a \Error{compile-time error} if the name of a named optional parameter
23182315begins with an `_' character.
You can’t perform that action at this time.
0 commit comments