Skip to content

Commit f78d041

Browse files
committed
Adjust examples declaring non-nullable positional optional parameters with no default
1 parent e1cf9d5 commit f78d041

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

specification/dartLangSpec.tex

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3469,7 +3469,7 @@ \subsubsection{The Method \code{noSuchMethod}}
34693469
in order to correctly override \code{noSuchMethod} in \code{Object}.
34703470
For instance, it can have signature
34713471
\code{noSuchMethod(Invocation i)} or
3472-
\code{noSuchMethod(Object i, [String s = ''])},
3472+
\code{noSuchMethod(Object i, [String? s])},
34733473
but not
34743474
\code{noSuchMethod(Invocation i, String s)}.
34753475
This implies that the situation where \code{noSuchMethod} is invoked
@@ -4242,7 +4242,7 @@ \subsubsection{Generative Constructors}
42424242

42434243
\begin{dartCode}
42444244
class A \{
4245-
int x;
4245+
int? x;
42464246
A([this.x]);
42474247
\}
42484248
\end{dartCode}
@@ -4253,8 +4253,8 @@ \subsubsection{Generative Constructors}
42534253

42544254
\begin{dartCode}
42554255
class A \{
4256-
int x;
4257-
A([int x]): this.x = x;
4256+
int? x;
4257+
A([int? x]): this.x = x;
42584258
\}
42594259
\end{dartCode}
42604260

@@ -15962,7 +15962,7 @@ \subsubsection{Generic Method Instantiation}
1596215962
\}
1596315963
\\
1596415964
\CLASS{} B \EXTENDS{} /*\,or\,\,\IMPLEMENTS\,*/ A \{
15965-
X fi<X \EXTENDS{} num>(X x, [List<X> xs]) => x;
15965+
X fi<X \EXTENDS{} num>(X x, [List<X>? xs]) => x;
1596615966
\}
1596715967
\\
1596815968
\VOID{} main() \{
@@ -15971,9 +15971,9 @@ \subsubsection{Generic Method Instantiation}
1597115971
\}
1597215972
\end{dartCode}
1597315973

15974-
\noindent
15974+
\commentary{%
1597515975
The function object that \code{f} is bound to at the end of \code{main}
15976-
has dynamic type \code{int\,\,\FUNCTION(int,\,[List<int>])},
15976+
has dynamic type \code{int\,\,\FUNCTION(int,\,[List<int>?])},
1597715977
and it is obtained by implicitly
1597815978
``passing the actual type argument \code{int}''
1597915979
to the denoted generic instance method,

0 commit comments

Comments
 (0)