Skip to content

Commit 3678b27

Browse files
committed
Correction: Update dynamic type of covariant parameter to Object?
1 parent b7fea80 commit 3678b27

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
@@ -5856,7 +5856,7 @@ \subsubsection{Correct Member Overrides}
58565856
\item
58575857
If $m$ and $m'$ are both methods or both setters:
58585858
Let $F$ be the function type of $m$
5859-
except that the parameter type is the built-in class \code{Object}
5859+
except that the parameter type is \code{Object?}
58605860
for each parameter of $m$ which is covariant-by-declaration
58615861
(\ref{covariantParameters}).
58625862
Let $F'$ be the function type of $m'$.
@@ -7846,7 +7846,7 @@ \subsection{Super-Bounded Types}
78467846
\end{dartCode}
78477847

78487848
\commentary{%
7849-
With this, \code{a.x} has static type \code{Object},
7849+
With this, \code{a.x} has static type \code{Object?},
78507850
even though the upper bound on the type variable \code{X} is \code{num}.%
78517851
}
78527852

@@ -7873,7 +7873,7 @@ \subsection{Super-Bounded Types}
78737873
(noting that all types must be regular-bounded
78747874
when we do not have the notion of super-bounded types).
78757875
So if we wish to allow a variable to hold any instance ``of type \code{C}''
7876-
then that variable must use \code{Object} or another top type
7876+
then that variable must use \code{Object?} or another top type
78777877
as its type annotation,
78787878
which means that a member like \code{next} is not known to exist
78797879
(which is what we mean by saying that the type is `less informative').%
@@ -14933,7 +14933,7 @@ \subsubsection{Superinvocations}
1493314933
It is a \Error{compile-time error} if a method superinvocation occurs
1493414934
in a top-level function or variable initializer,
1493514935
in an instance variable initializer or initializer list,
14936-
in class \code{Object},
14936+
in the built-in class \code{Object},
1493714937
in a factory constructor,
1493814938
or in a static method or variable initializer.
1493914939

0 commit comments

Comments
 (0)