Skip to content

Commit 7d40323

Browse files
committed
Correction: Update dynamic type of covariant parameter to Object?
1 parent 97aa802 commit 7d40323

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
@@ -5851,7 +5851,7 @@ \subsubsection{Correct Member Overrides}
58515851
\item
58525852
If $m$ and $m'$ are both methods or both setters:
58535853
Let $F$ be the function type of $m$
5854-
except that the parameter type is the built-in class \code{Object}
5854+
except that the parameter type is \code{Object?}
58555855
for each parameter of $m$ which is covariant-by-declaration
58565856
(\ref{covariantParameters}).
58575857
Let $F'$ be the function type of $m'$.
@@ -7841,7 +7841,7 @@ \subsection{Super-Bounded Types}
78417841
\end{dartCode}
78427842

78437843
\commentary{%
7844-
With this, \code{a.x} has static type \code{Object},
7844+
With this, \code{a.x} has static type \code{Object?},
78457845
even though the upper bound on the type variable \code{X} is \code{num}.%
78467846
}
78477847

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

0 commit comments

Comments
 (0)