Skip to content

Commit 902db70

Browse files
committed
Correction: Update dynamic type of covariant parameter to Object?
1 parent c2288c3 commit 902db70

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
@@ -5836,7 +5836,7 @@ \subsubsection{Correct Member Overrides}
58365836
\item
58375837
If $m$ and $m'$ are both methods or both setters:
58385838
Let $F$ be the function type of $m$
5839-
except that the parameter type is the built-in class \code{Object}
5839+
except that the parameter type is \code{Object?}
58405840
for each parameter of $m$ which is covariant-by-declaration
58415841
(\ref{covariantParameters}).
58425842
Let $F'$ be the function type of $m'$.
@@ -7828,7 +7828,7 @@ \subsection{Super-Bounded Types}
78287828
\end{dartCode}
78297829

78307830
\commentary{%
7831-
With this, \code{a.x} has static type \code{Object},
7831+
With this, \code{a.x} has static type \code{Object?},
78327832
even though the upper bound on the type variable \code{X} is \code{num}.%
78337833
}
78347834

@@ -7855,7 +7855,7 @@ \subsection{Super-Bounded Types}
78557855
(noting that all types must be regular-bounded
78567856
when we do not have the notion of super-bounded types).
78577857
So if we wish to allow a variable to hold any instance ``of type \code{C}''
7858-
then that variable must use \code{Object} or another top type
7858+
then that variable must use \code{Object?} or another top type
78597859
as its type annotation,
78607860
which means that a member like \code{next} is not known to exist
78617861
(which is what we mean by saying that the type is `less informative').%
@@ -12814,7 +12814,7 @@ \subsection{Function Invocation}
1281412814
where $U$ is determined as follows:
1281512815
Let $T$ be the actual return type of $f$ (\ref{actualTypes}).
1281612816
If $T$ is \code{Iterable<$S$>} for some type $S$, then $U$ is $S$,
12817-
otherwise $U$ is \code{Object}.
12817+
otherwise $U$ is \code{Object?}.
1281812818

1281912819
\commentary{%
1282012820
A Dart implementation will need to provide
@@ -12932,7 +12932,7 @@ \subsection{Function Invocation}
1293212932
where $U$ is determined as follows:
1293312933
Let $T$ be the actual return type of $f$ (\ref{actualTypes}).
1293412934
If $T$ is \code{Stream<$S$>} for some type $S$, then $U$ is $S$,
12935-
otherwise $U$ is \code{Object}.
12935+
otherwise $U$ is \code{Object?}.
1293612936
When $s$ is listened to, execution of the body of $f$ will begin.
1293712937
When execution of the body of $f$ completes:
1293812938
\begin{itemize}
@@ -14914,7 +14914,7 @@ \subsubsection{Superinvocations}
1491414914
It is a \Error{compile-time error} if a method superinvocation occurs
1491514915
in a top-level function or variable initializer,
1491614916
in an instance variable initializer or initializer list,
14917-
in class \code{Object},
14917+
in the built-in class \code{Object},
1491814918
in a factory constructor,
1491914919
or in a static method or variable initializer.
1492014920

0 commit comments

Comments
 (0)