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 @@ -2462,17 +2462,9 @@ \subsubsection{Optional and Named Formals}
24622462
24632463<defaultNamedParameter> ::= \gnewline{}
24642464 <metadata> \REQUIRED? <normalFormalParameterNoMetadata>
2465- \gnewline{} ((`=' | `:') <expression>)?
2465+ \gnewline{} (`:' <expression>)?
24662466\end{grammar}
24672467
2468- \LMHash{}%
2469- The form \syntax{<normalFormalParameter> `:' <expression>}
2470- is equivalent to the form
2471- \syntax{<normalFormalParameter> `=' <expression>}.
2472- The colon-syntax is included only for backwards compatibility.
2473- It is deprecated and will be removed in
2474- a later version of the language specification.
2475-
24762468\LMHash{}%
24772469It is a \Error{compile-time error} if an optional or named formal parameter has
24782470the modifier \CONST{} or the modifier \LATE.
@@ -2487,6 +2479,11 @@ \subsubsection{Optional and Named Formals}
24872479It is a
24882480\Error{compile-time error} if a required named parameter has a default value.
24892481
2482+ \LMHash{}%
2483+ Assume that $p$ is an optional named parameter with default value $d$.
2484+ It is a \Error{compile-time error}
2485+ if the static type of $d$ is not assignable to the declared type of $p$.
2486+
24902487\LMHash{}%
24912488It is a \Error{compile-time error} if the name of a named optional parameter
24922489begins with an `_' character.
You can’t perform that action at this time.
0 commit comments