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}
2457
2457
2458
2458
<defaultNamedParameter> ::= \gnewline{}
2459
2459
<metadata> \REQUIRED? <normalFormalParameterNoMetadata>
2460
- \gnewline{} ((`=' | `:') <expression>)?
2460
+ \gnewline{} (`:' <expression>)?
2461
2461
\end{grammar}
2462
2462
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
-
2471
2463
\LMHash{}%
2472
2464
It is a \Error{compile-time error} if an optional or named formal parameter has
2473
2465
the modifier \CONST{} or the modifier \LATE.
@@ -2482,6 +2474,11 @@ \subsubsection{Optional and Named Formals}
2482
2474
It is a
2483
2475
\Error{compile-time error} if a required named parameter has a default value.
2484
2476
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
+
2485
2482
\LMHash{}%
2486
2483
It is a \Error{compile-time error} if the name of a named optional parameter
2487
2484
begins with an `_' character.
You can’t perform that action at this time.
0 commit comments