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 @@ -2462,17 +2462,9 @@ \subsubsection{Optional and Named Formals}
2462
2462
2463
2463
<defaultNamedParameter> ::= \gnewline{}
2464
2464
<metadata> \REQUIRED? <normalFormalParameterNoMetadata>
2465
- \gnewline{} ((`=' | `:') <expression>)?
2465
+ \gnewline{} (`:' <expression>)?
2466
2466
\end{grammar}
2467
2467
2468
- \LMHash{}%
2469
- The form \syntax{<normalFormalParameter> `:' <expression>}
2470
- is equivalent to the form
2471
- \syntax{<normalFormalParameter> `=' <expression>}.
2472
- The colon-syntax is included only for backwards compatibility.
2473
- It is deprecated and will be removed in
2474
- a later version of the language specification.
2475
-
2476
2468
\LMHash{}%
2477
2469
It is a \Error{compile-time error} if an optional or named formal parameter has
2478
2470
the modifier \CONST{} or the modifier \LATE.
@@ -2487,6 +2479,11 @@ \subsubsection{Optional and Named Formals}
2487
2479
It is a
2488
2480
\Error{compile-time error} if a required named parameter has a default value.
2489
2481
2482
+ \LMHash{}%
2483
+ Assume that $p$ is an optional named parameter with default value $d$.
2484
+ It is a \Error{compile-time error}
2485
+ if the static type of $d$ is not assignable to the declared type of $p$.
2486
+
2490
2487
\LMHash{}%
2491
2488
It is a \Error{compile-time error} if the name of a named optional parameter
2492
2489
begins with an `_' character.
You can’t perform that action at this time.
0 commit comments