Skip to content

Commit 2ce2c59

Browse files
committed
Adjust examples declaring non-nullable positional optional parameters with no default
1 parent 12c0ccd commit 2ce2c59

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
@@ -3408,7 +3408,7 @@ \subsubsection{The Method \code{noSuchMethod}}
34083408
in order to correctly override \code{noSuchMethod} in \code{Object}.
34093409
For instance, it can have signature
34103410
\code{noSuchMethod(Invocation i)} or
3411-
\code{noSuchMethod(Object i, [String s = ''])},
3411+
\code{noSuchMethod(Object i, [String? s])},
34123412
but not
34133413
\code{noSuchMethod(Invocation i, String s)}.
34143414
This implies that the situation where \code{noSuchMethod} is invoked
@@ -4179,7 +4179,7 @@ \subsubsection{Generative Constructors}
41794179

41804180
\begin{dartCode}
41814181
class A \{
4182-
int x;
4182+
int? x;
41834183
A([this.x]);
41844184
\}
41854185
\end{dartCode}
@@ -4190,8 +4190,8 @@ \subsubsection{Generative Constructors}
41904190

41914191
\begin{dartCode}
41924192
class A \{
4193-
int x;
4194-
A([int x]): this.x = x;
4193+
int? x;
4194+
A([int? x]): this.x = x;
41954195
\}
41964196
\end{dartCode}
41974197

@@ -15646,7 +15646,7 @@ \subsubsection{Generic Method Instantiation}
1564615646
\}
1564715647
\\
1564815648
\CLASS{} B \EXTENDS{} /*\,or\,\,\IMPLEMENTS\,*/ A \{
15649-
X fi<X \EXTENDS{} num>(X x, [List<X> xs]) => x;
15649+
X fi<X \EXTENDS{} num>(X x, [List<X>? xs]) => x;
1565015650
\}
1565115651
\\
1565215652
\VOID{} main() \{
@@ -15658,7 +15658,7 @@ \subsubsection{Generic Method Instantiation}
1565815658
\commentary{%
1565915659
\noindent
1566015660
The function object that \code{f} is bound to at the end of \code{main}
15661-
has dynamic type \code{int\,\,\FUNCTION(int,\,[List<int>])},
15661+
has dynamic type \code{int\,\,\FUNCTION(int,\,[List<int>?])},
1566215662
and it is obtained by implicitly
1566315663
``passing the actual type argument \code{int}''
1566415664
to the denoted generic instance method,

0 commit comments

Comments
 (0)