Skip to content

Commit 3cbb3ec

Browse files
committed
Correction: Update dynamic type of covariant parameter to Object?
1 parent 844bfb4 commit 3cbb3ec

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
@@ -5957,7 +5957,7 @@ \subsubsection{Correct Member Overrides}
59575957
\item
59585958
If $m$ and $m'$ are both methods or both setters:
59595959
Let $F$ be the function type of $m$
5960-
except that the parameter type is the built-in class \code{Object}
5960+
except that the parameter type is \code{Object?}
59615961
for each parameter of $m$ which is covariant-by-declaration
59625962
(\ref{covariantParameters}).
59635963
Let $F'$ be the function type of $m'$.
@@ -7967,7 +7967,7 @@ \subsection{Super-Bounded Types}
79677967
\end{dartCode}
79687968

79697969
\commentary{%
7970-
With this, \code{a.x} has static type \code{Object},
7970+
With this, \code{a.x} has static type \code{Object?},
79717971
even though the upper bound on the type variable \code{X} is \code{num}.%
79727972
}
79737973

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

0 commit comments

Comments
 (0)