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 @@ -2515,17 +2515,9 @@ \subsubsection{Optional and Named Formals}
2515
2515
2516
2516
<defaultNamedParameter> ::= \gnewline{}
2517
2517
<metadata> \REQUIRED? <normalFormalParameterNoMetadata>
2518
- \gnewline{} ((`=' | `:') <expression>)?
2518
+ \gnewline{} (`:' <expression>)?
2519
2519
\end{grammar}
2520
2520
2521
- \LMHash{}%
2522
- The form \syntax{<normalFormalParameter> `:' <expression>}
2523
- is equivalent to the form
2524
- \syntax{<normalFormalParameter> `=' <expression>}.
2525
- The colon-syntax is included only for backwards compatibility.
2526
- It is deprecated and will be removed in
2527
- a later version of the language specification.
2528
-
2529
2521
\LMHash{}%
2530
2522
It is a \Error{compile-time error} if an optional or named formal parameter has
2531
2523
the modifier \CONST{} or the modifier \LATE.
@@ -2540,6 +2532,11 @@ \subsubsection{Optional and Named Formals}
2540
2532
It is a
2541
2533
\Error{compile-time error} if a required named parameter has a default value.
2542
2534
2535
+ \LMHash{}%
2536
+ Assume that $p$ is an optional named parameter with default value $d$.
2537
+ It is a \Error{compile-time error}
2538
+ if the static type of $d$ is not assignable to the declared type of $p$.
2539
+
2543
2540
\LMHash{}%
2544
2541
It is a \Error{compile-time error} if the name of a named optional parameter
2545
2542
begins with an `_' character.
You can’t perform that action at this time.
0 commit comments