Skip to content

Commit 2e5e86e

Browse files
committed
Adjust examples declaring non-nullable positional optional parameters with no default
1 parent 79b8d25 commit 2e5e86e

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
@@ -3473,7 +3473,7 @@ \subsubsection{The Method \code{noSuchMethod}}
34733473
in order to correctly override \code{noSuchMethod} in \code{Object}.
34743474
For instance, it can have signature
34753475
\code{noSuchMethod(Invocation i)} or
3476-
\code{noSuchMethod(Object i, [String s = ''])},
3476+
\code{noSuchMethod(Object i, [String? s])},
34773477
but not
34783478
\code{noSuchMethod(Invocation i, String s)}.
34793479
This implies that the situation where \code{noSuchMethod} is invoked
@@ -4246,7 +4246,7 @@ \subsubsection{Generative Constructors}
42464246

42474247
\begin{dartCode}
42484248
class A \{
4249-
int x;
4249+
int? x;
42504250
A([this.x]);
42514251
\}
42524252
\end{dartCode}
@@ -4257,8 +4257,8 @@ \subsubsection{Generative Constructors}
42574257

42584258
\begin{dartCode}
42594259
class A \{
4260-
int x;
4261-
A([int x]): this.x = x;
4260+
int? x;
4261+
A([int? x]): this.x = x;
42624262
\}
42634263
\end{dartCode}
42644264

@@ -15966,7 +15966,7 @@ \subsubsection{Generic Method Instantiation}
1596615966
\}
1596715967
\\
1596815968
\CLASS{} B \EXTENDS{} /*\,or\,\,\IMPLEMENTS\,*/ A \{
15969-
X fi<X \EXTENDS{} num>(X x, [List<X> xs]) => x;
15969+
X fi<X \EXTENDS{} num>(X x, [List<X>? xs]) => x;
1597015970
\}
1597115971
\\
1597215972
\VOID{} main() \{
@@ -15975,9 +15975,9 @@ \subsubsection{Generic Method Instantiation}
1597515975
\}
1597615976
\end{dartCode}
1597715977

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

0 commit comments

Comments
 (0)