Skip to content

Commit 64cc7ce

Browse files
committed
Add missing updates in section typeVoid
1 parent bde9831 commit 64cc7ce

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

specification/dartLangSpec.tex

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25985,7 +25985,7 @@ \subsection{Type FutureOr}
2598525985
\end{itemize}
2598625986

2598725987

25988-
\subsection{Type Void}
25988+
\subsection{Type \VOID}
2598925989
\LMLabel{typeVoid}
2599025990

2599125991
\LMHash{}%
@@ -26015,22 +26015,10 @@ \subsection{Type Void}
2601526015
\commentary{%
2601626016
The type \VOID{} is a top type
2601726017
(\ref{superBoundedTypes}),
26018-
so \VOID{} and \code{Object} are subtypes of each other
26018+
so \VOID{} and \code{Object?} are subtypes of each other
2601926019
(\ref{subtypes}),
2602026020
which also implies that any object can be
26021-
the value of an expression of type \VOID.
26022-
%
26023-
Consequently, any instance of type \code{Type} which reifies the type \VOID{}
26024-
must compare equal (according to the \lit{==} operator \ref{equality})
26025-
to any instance of \code{Type} which reifies the type \code{Object}
26026-
(\ref{dynamicTypeSystem}).
26027-
It is not guaranteed that \code{identical(\VOID, Object)} evaluates to
26028-
the \TRUE{} object.
26029-
In fact, it is not recommended that implementations strive to achieve this,
26030-
because it may be more important to ensure that diagnostic messages
26031-
(including stack traces and dynamic error messages)
26032-
preserve enough information to use the word `void' when referring to types
26033-
which are specified as such in source code.%
26021+
the value of an expression of type \VOID.%
2603426022
}
2603526023

2603626024
\LMHash{}%
@@ -26180,7 +26168,7 @@ \subsection{Type Void}
2618026168
\commentary{Here are some examples:}
2618126169

2618226170
\begin{dartCode}
26183-
\FOR{} (Object x in <\VOID>[]) \{\} // \comment{Error.}
26171+
\FOR{} (Object? x in <\VOID>[]) \{\} // \comment{Error.}
2618426172
\AWAIT{} \FOR{} (int x \IN{} new Stream<\VOID{}>.empty()) \{\} // \comment{Error.}
2618526173
\FOR{} (\VOID{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK.}
2618626174
\FOR (\VAR{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK, type of x inferred.}

0 commit comments

Comments
 (0)