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 @@ -2457,17 +2457,9 @@ \subsubsection{Optional and Named Formals}
24572457
24582458<defaultNamedParameter> ::= \gnewline{}
24592459 <metadata> \REQUIRED? <normalFormalParameterNoMetadata>
2460- \gnewline{} ((`=' | `:') <expression>)?
2460+ \gnewline{} (`:' <expression>)?
24612461\end{grammar}
24622462
2463- \LMHash{}%
2464- The form \syntax{<normalFormalParameter> `:' <expression>}
2465- is equivalent to the form
2466- \syntax{<normalFormalParameter> `=' <expression>}.
2467- The colon-syntax is included only for backwards compatibility.
2468- It is deprecated and will be removed in
2469- a later version of the language specification.
2470-
24712463\LMHash{}%
24722464It is a \Error{compile-time error} if an optional or named formal parameter has
24732465the modifier \CONST{} or the modifier \LATE.
@@ -2482,6 +2474,11 @@ \subsubsection{Optional and Named Formals}
24822474It is a
24832475\Error{compile-time error} if a required named parameter has a default value.
24842476
2477+ \LMHash{}%
2478+ Assume that $p$ is an optional named parameter with default value $d$.
2479+ It is a \Error{compile-time error}
2480+ if the static type of $d$ is not assignable to the declared type of $p$.
2481+
24852482\LMHash{}%
24862483It is a \Error{compile-time error} if the name of a named optional parameter
24872484begins with an `_' character.
You can’t perform that action at this time.
0 commit comments