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 @@ -2524,17 +2524,9 @@ \subsubsection{Optional and Named Formals}
25242524
25252525<defaultNamedParameter> ::= \gnewline{}
25262526 <metadata> \REQUIRED? <normalFormalParameterNoMetadata>
2527- \gnewline{} ((`=' | `:') <expression>)?
2527+ \gnewline{} (`:' <expression>)?
25282528\end{grammar}
25292529
2530- \LMHash{}%
2531- The form \syntax{<normalFormalParameter> `:' <expression>}
2532- is equivalent to the form
2533- \syntax{<normalFormalParameter> `=' <expression>}.
2534- The colon-syntax is included only for backwards compatibility.
2535- It is deprecated and will be removed in
2536- a later version of the language specification.
2537-
25382530\LMHash{}%
25392531It is a \Error{compile-time error} if an optional or named formal parameter has
25402532the modifier \CONST{} or the modifier \LATE.
@@ -2549,6 +2541,11 @@ \subsubsection{Optional and Named Formals}
25492541It is a
25502542\Error{compile-time error} if a required named parameter has a default value.
25512543
2544+ \LMHash{}%
2545+ Assume that $p$ is an optional named parameter with default value $d$.
2546+ It is a \Error{compile-time error}
2547+ if the static type of $d$ is not assignable to the declared type of $p$.
2548+
25522549\LMHash{}%
25532550It is a \Error{compile-time error} if the name of a named optional parameter
25542551begins with an `_' character.
You can’t perform that action at this time.
0 commit comments