File tree 1 file changed +6
-9
lines changed 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}
2442
2442
2443
2443
<defaultNamedParameter> ::= \gnewline{}
2444
2444
<metadata> \REQUIRED? <normalFormalParameterNoMetadata>
2445
- \gnewline{} ((`=' | `:') <expression>)?
2445
+ \gnewline{} (`:' <expression>)?
2446
2446
\end{grammar}
2447
2447
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
-
2456
2448
\LMHash{}%
2457
2449
It is a \Error{compile-time error} if an optional or named formal parameter has
2458
2450
the modifier \CONST{} or the modifier \LATE.
@@ -2467,6 +2459,11 @@ \subsubsection{Optional and Named Formals}
2467
2459
It is a
2468
2460
\Error{compile-time error} if a required named parameter has a default value.
2469
2461
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
+
2470
2467
\LMHash{}%
2471
2468
It is a \Error{compile-time error} if the name of a named optional parameter
2472
2469
begins with an `_' character.
You can’t perform that action at this time.
0 commit comments