Skip to content

Commit 7a30a11

Browse files
committed
Adjust examples declaring non-nullable positional optional parameters with no default
1 parent 2cdae2a commit 7a30a11

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

specification/dartLangSpec.tex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3231,7 +3231,7 @@ \subsubsection{The Method \code{noSuchMethod}}
32313231
in order to correctly override \code{noSuchMethod} in \code{Object}.
32323232
For instance, it can have signature
32333233
\code{noSuchMethod(Invocation i)} or
3234-
\code{noSuchMethod(Object i, [String s = ''])},
3234+
\code{noSuchMethod(Object i, [String? s])},
32353235
but not
32363236
\code{noSuchMethod(Invocation i, String s)}.
32373237
This implies that the situation where \code{noSuchMethod} is invoked
@@ -4002,7 +4002,7 @@ \subsubsection{Generative Constructors}
40024002

40034003
\begin{dartCode}
40044004
class A \{
4005-
int x;
4005+
int? x;
40064006
A([this.x]);
40074007
\}
40084008
\end{dartCode}
@@ -4013,8 +4013,8 @@ \subsubsection{Generative Constructors}
40134013

40144014
\begin{dartCode}
40154015
class A \{
4016-
int x;
4017-
A([int x]): this.x = x;
4016+
int? x;
4017+
A([int? x]): this.x = x;
40184018
\}
40194019
\end{dartCode}
40204020

@@ -15398,7 +15398,7 @@ \subsubsection{Generic Method Instantiation}
1539815398
\}
1539915399
\\
1540015400
\CLASS{} B \EXTENDS{} /*\,or\,\,\IMPLEMENTS\,*/ A \{
15401-
X fi<X \EXTENDS{} num>(X x, [List<X> xs]) => x;
15401+
X fi<X \EXTENDS{} num>(X x, [List<X>? xs]) => x;
1540215402
\}
1540315403
\\
1540415404
\VOID{} main() \{
@@ -15410,7 +15410,7 @@ \subsubsection{Generic Method Instantiation}
1541015410
\commentary{%
1541115411
\noindent
1541215412
The function object that \code{f} is bound to at the end of \code{main}
15413-
has dynamic type \code{int\,\,\FUNCTION(int,\,[List<int>])},
15413+
has dynamic type \code{int\,\,\FUNCTION(int,\,[List<int>?])},
1541415414
and it is obtained by implicitly
1541515415
``passing the actual type argument \code{int}''
1541615416
to the denoted generic instance method,

0 commit comments

Comments
 (0)