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 @@ -2288,17 +2288,9 @@ \subsubsection{Optional and Named Formals}
2288
2288
2289
2289
<defaultNamedParameter> ::= \gnewline{}
2290
2290
<metadata> \REQUIRED? <normalFormalParameterNoMetadata>
2291
- \gnewline{} ((`=' | `:') <expression>)?
2291
+ \gnewline{} (`:' <expression>)?
2292
2292
\end{grammar}
2293
2293
2294
- \LMHash{}%
2295
- The form \syntax{<normalFormalParameter> `:' <expression>}
2296
- is equivalent to the form
2297
- \syntax{<normalFormalParameter> `=' <expression>}.
2298
- The colon-syntax is included only for backwards compatibility.
2299
- It is deprecated and will be removed in
2300
- a later version of the language specification.
2301
-
2302
2294
\LMHash{}%
2303
2295
It is a \Error{compile-time error} if an optional or named formal parameter has
2304
2296
the modifier \CONST{} or the modifier \LATE.
@@ -2313,6 +2305,11 @@ \subsubsection{Optional and Named Formals}
2313
2305
It is a
2314
2306
\Error{compile-time error} if a required named parameter has a default value.
2315
2307
2308
+ \LMHash{}%
2309
+ Assume that $p$ is an optional named parameter with default value $d$.
2310
+ It is a \Error{compile-time error}
2311
+ if the static type of $d$ is not assignable to the declared type of $p$.
2312
+
2316
2313
\LMHash{}%
2317
2314
It is a \Error{compile-time error} if the name of a named optional parameter
2318
2315
begins with an `_' character.
You can’t perform that action at this time.
0 commit comments