Skip to content

Commit a852e61

Browse files
committed
Adjust examples declaring non-nullable positional optional parameters with no default
1 parent 06179d9 commit a852e61

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
@@ -3413,7 +3413,7 @@ \subsubsection{The Method \code{noSuchMethod}}
34133413
in order to correctly override \code{noSuchMethod} in \code{Object}.
34143414
For instance, it can have signature
34153415
\code{noSuchMethod(Invocation i)} or
3416-
\code{noSuchMethod(Object i, [String s = ''])},
3416+
\code{noSuchMethod(Object i, [String? s])},
34173417
but not
34183418
\code{noSuchMethod(Invocation i, String s)}.
34193419
This implies that the situation where \code{noSuchMethod} is invoked
@@ -4184,7 +4184,7 @@ \subsubsection{Generative Constructors}
41844184

41854185
\begin{dartCode}
41864186
class A \{
4187-
int x;
4187+
int? x;
41884188
A([this.x]);
41894189
\}
41904190
\end{dartCode}
@@ -4195,8 +4195,8 @@ \subsubsection{Generative Constructors}
41954195

41964196
\begin{dartCode}
41974197
class A \{
4198-
int x;
4199-
A([int x]): this.x = x;
4198+
int? x;
4199+
A([int? x]): this.x = x;
42004200
\}
42014201
\end{dartCode}
42024202

@@ -15651,7 +15651,7 @@ \subsubsection{Generic Method Instantiation}
1565115651
\}
1565215652
\\
1565315653
\CLASS{} B \EXTENDS{} /*\,or\,\,\IMPLEMENTS\,*/ A \{
15654-
X fi<X \EXTENDS{} num>(X x, [List<X> xs]) => x;
15654+
X fi<X \EXTENDS{} num>(X x, [List<X>? xs]) => x;
1565515655
\}
1565615656
\\
1565715657
\VOID{} main() \{
@@ -15663,7 +15663,7 @@ \subsubsection{Generic Method Instantiation}
1566315663
\commentary{%
1566415664
\noindent
1566515665
The function object that \code{f} is bound to at the end of \code{main}
15666-
has dynamic type \code{int\,\,\FUNCTION(int,\,[List<int>])},
15666+
has dynamic type \code{int\,\,\FUNCTION(int,\,[List<int>?])},
1566715667
and it is obtained by implicitly
1566815668
``passing the actual type argument \code{int}''
1566915669
to the denoted generic instance method,

0 commit comments

Comments
 (0)