Skip to content

Commit cecf5a0

Browse files
committed
Correction: Update dynamic type of covariant parameter to Object?
1 parent 371b7b3 commit cecf5a0

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
@@ -5680,7 +5680,7 @@ \subsubsection{Correct Member Overrides}
56805680
\item
56815681
If $m$ and $m'$ are both methods or both setters:
56825682
Let $F$ be the function type of $m$
5683-
except that the parameter type is the built-in class \code{Object}
5683+
except that the parameter type is \code{Object?}
56845684
for each parameter of $m$ which is covariant-by-declaration
56855685
(\ref{covariantParameters}).
56865686
Let $F'$ be the function type of $m'$.
@@ -7672,7 +7672,7 @@ \subsection{Super-Bounded Types}
76727672
\end{dartCode}
76737673

76747674
\commentary{%
7675-
With this, \code{a.x} has static type \code{Object},
7675+
With this, \code{a.x} has static type \code{Object?},
76767676
even though the upper bound on the type variable \code{X} is \code{num}.%
76777677
}
76787678

@@ -7699,7 +7699,7 @@ \subsection{Super-Bounded Types}
76997699
(noting that all types must be regular-bounded
77007700
when we do not have the notion of super-bounded types).
77017701
So if we wish to allow a variable to hold any instance ``of type \code{C}''
7702-
then that variable must use \code{Object} or another top type
7702+
then that variable must use \code{Object?} or another top type
77037703
as its type annotation,
77047704
which means that a member like \code{next} is not known to exist
77057705
(which is what we mean by saying that the type is `less informative').%
@@ -12652,7 +12652,7 @@ \subsection{Function Invocation}
1265212652
where $U$ is determined as follows:
1265312653
Let $T$ be the actual return type of $f$ (\ref{actualTypes}).
1265412654
If $T$ is \code{Iterable<$S$>} for some type $S$, then $U$ is $S$,
12655-
otherwise $U$ is \code{Object}.
12655+
otherwise $U$ is \code{Object?}.
1265612656

1265712657
\commentary{%
1265812658
A Dart implementation will need to provide
@@ -12770,7 +12770,7 @@ \subsection{Function Invocation}
1277012770
where $U$ is determined as follows:
1277112771
Let $T$ be the actual return type of $f$ (\ref{actualTypes}).
1277212772
If $T$ is \code{Stream<$S$>} for some type $S$, then $U$ is $S$,
12773-
otherwise $U$ is \code{Object}.
12773+
otherwise $U$ is \code{Object?}.
1277412774
When $s$ is listened to, execution of the body of $f$ will begin.
1277512775
When execution of the body of $f$ completes:
1277612776
\begin{itemize}
@@ -14752,7 +14752,7 @@ \subsubsection{Superinvocations}
1475214752
It is a \Error{compile-time error} if a method superinvocation occurs
1475314753
in a top-level function or variable initializer,
1475414754
in an instance variable initializer or initializer list,
14755-
in class \code{Object},
14755+
in the built-in class \code{Object},
1475614756
in a factory constructor,
1475714757
or in a static method or variable initializer.
1475814758

0 commit comments

Comments
 (0)