Skip to content

Commit aae2127

Browse files
committed
Correction: Update dynamic type of covariant parameter to Object?
1 parent c7a7251 commit aae2127

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
@@ -5968,7 +5968,7 @@ \subsubsection{Correct Member Overrides}
59685968
\item
59695969
If $m$ and $m'$ are both methods or both setters:
59705970
Let $F$ be the function type of $m$
5971-
except that the parameter type is the built-in class \code{Object}
5971+
except that the parameter type is \code{Object?}
59725972
for each parameter of $m$ which is covariant-by-declaration
59735973
(\ref{covariantParameters}).
59745974
Let $F'$ be the function type of $m'$.
@@ -7990,7 +7990,7 @@ \subsection{Super-Bounded Types}
79907990
\end{dartCode}
79917991

79927992
\commentary{%
7993-
With this, \code{a.x} has static type \code{Object},
7993+
With this, \code{a.x} has static type \code{Object?},
79947994
even though the upper bound on the type variable \code{X} is \code{num}.%
79957995
}
79967996

@@ -8017,7 +8017,7 @@ \subsection{Super-Bounded Types}
80178017
(noting that all types must be regular-bounded
80188018
when we do not have the notion of super-bounded types).
80198019
So if we wish to allow a variable to hold any instance ``of type \code{C}''
8020-
then that variable must use \code{Object} or another top type
8020+
then that variable must use \code{Object?} or another top type
80218021
as its type annotation,
80228022
which means that a member like \code{next} is not known to exist
80238023
(which is what we mean by saying that the type is `less informative').%
@@ -15247,7 +15247,7 @@ \subsubsection{Superinvocations}
1524715247
It is a \Error{compile-time error} if a method superinvocation occurs
1524815248
in a top-level function or variable initializer,
1524915249
in an instance variable initializer or initializer list,
15250-
in class \code{Object},
15250+
in the built-in class \code{Object},
1525115251
in a factory constructor,
1525215252
or in a static method or variable initializer.
1525315253

0 commit comments

Comments
 (0)