Skip to content

Commit 17f917d

Browse files
committed
Correction: Update dynamic type of covariant parameter to Object?
1 parent ac0594a commit 17f917d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

specification/dartLangSpec.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5953,7 +5953,7 @@ \subsubsection{Correct Member Overrides}
59535953
\item
59545954
If $m$ and $m'$ are both methods or both setters:
59555955
Let $F$ be the function type of $m$
5956-
except that the parameter type is the built-in class \code{Object}
5956+
except that the parameter type is \code{Object?}
59575957
for each parameter of $m$ which is covariant-by-declaration
59585958
(\ref{covariantParameters}).
59595959
Let $F'$ be the function type of $m'$.
@@ -7963,7 +7963,7 @@ \subsection{Super-Bounded Types}
79637963
\end{dartCode}
79647964

79657965
\commentary{%
7966-
With this, \code{a.x} has static type \code{Object},
7966+
With this, \code{a.x} has static type \code{Object?},
79677967
even though the upper bound on the type variable \code{X} is \code{num}.%
79687968
}
79697969

@@ -7990,7 +7990,7 @@ \subsection{Super-Bounded Types}
79907990
(noting that all types must be regular-bounded
79917991
when we do not have the notion of super-bounded types).
79927992
So if we wish to allow a variable to hold any instance ``of type \code{C}''
7993-
then that variable must use \code{Object} or another top type
7993+
then that variable must use \code{Object?} or another top type
79947994
as its type annotation,
79957995
which means that a member like \code{next} is not known to exist
79967996
(which is what we mean by saying that the type is `less informative').%
@@ -15220,7 +15220,7 @@ \subsubsection{Superinvocations}
1522015220
It is a \Error{compile-time error} if a method superinvocation occurs
1522115221
in a top-level function or variable initializer,
1522215222
in an instance variable initializer or initializer list,
15223-
in class \code{Object},
15223+
in the built-in class \code{Object},
1522415224
in a factory constructor,
1522515225
or in a static method or variable initializer.
1522615226

0 commit comments

Comments
 (0)