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