Skip to content

Commit 311a42b

Browse files
committed
Adjust examples declaring non-nullable positional optional parameters with no default
1 parent 2894b2e commit 311a42b

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
@@ -3239,7 +3239,7 @@ \subsubsection{The Method \code{noSuchMethod}}
32393239
in order to correctly override \code{noSuchMethod} in \code{Object}.
32403240
For instance, it can have signature
32413241
\code{noSuchMethod(Invocation i)} or
3242-
\code{noSuchMethod(Object i, [String s = ''])},
3242+
\code{noSuchMethod(Object i, [String? s])},
32433243
but not
32443244
\code{noSuchMethod(Invocation i, String s)}.
32453245
This implies that the situation where \code{noSuchMethod} is invoked
@@ -4010,7 +4010,7 @@ \subsubsection{Generative Constructors}
40104010

40114011
\begin{dartCode}
40124012
class A \{
4013-
int x;
4013+
int? x;
40144014
A([this.x]);
40154015
\}
40164016
\end{dartCode}
@@ -4021,8 +4021,8 @@ \subsubsection{Generative Constructors}
40214021

40224022
\begin{dartCode}
40234023
class A \{
4024-
int x;
4025-
A([int x]): this.x = x;
4024+
int? x;
4025+
A([int? x]): this.x = x;
40264026
\}
40274027
\end{dartCode}
40284028

@@ -15470,7 +15470,7 @@ \subsubsection{Generic Method Instantiation}
1547015470
\}
1547115471
\\
1547215472
\CLASS{} B \EXTENDS{} /*\,or\,\,\IMPLEMENTS\,*/ A \{
15473-
X fi<X \EXTENDS{} num>(X x, [List<X> xs]) => x;
15473+
X fi<X \EXTENDS{} num>(X x, [List<X>? xs]) => x;
1547415474
\}
1547515475
\\
1547615476
\VOID{} main() \{
@@ -15482,7 +15482,7 @@ \subsubsection{Generic Method Instantiation}
1548215482
\commentary{%
1548315483
\noindent
1548415484
The function object that \code{f} is bound to at the end of \code{main}
15485-
has dynamic type \code{int\,\,\FUNCTION(int,\,[List<int>])},
15485+
has dynamic type \code{int\,\,\FUNCTION(int,\,[List<int>?])},
1548615486
and it is obtained by implicitly
1548715487
``passing the actual type argument \code{int}''
1548815488
to the denoted generic instance method,

0 commit comments

Comments
 (0)