@@ -25522,7 +25522,7 @@ \subsection{Type FutureOr}
2552225522\end{itemize}
2552325523
2552425524
25525- \subsection{Type Void }
25525+ \subsection{Type \VOID }
2552625526\LMLabel{typeVoid}
2552725527
2552825528\LMHash{}%
@@ -25552,22 +25552,10 @@ \subsection{Type Void}
2555225552\commentary{%
2555325553The type \VOID{} is a top type
2555425554(\ref{superBoundedTypes}),
25555- so \VOID{} and \code{Object} are subtypes of each other
25555+ so \VOID{} and \code{Object? } are subtypes of each other
2555625556(\ref{subtypes}),
2555725557which also implies that any object can be
25558- the value of an expression of type \VOID.
25559- %
25560- Consequently, any instance of type \code{Type} which reifies the type \VOID{}
25561- must compare equal (according to the \lit{==} operator \ref{equality})
25562- to any instance of \code{Type} which reifies the type \code{Object}
25563- (\ref{dynamicTypeSystem}).
25564- It is not guaranteed that \code{identical(\VOID, Object)} evaluates to
25565- the \TRUE{} object.
25566- In fact, it is not recommended that implementations strive to achieve this,
25567- because it may be more important to ensure that diagnostic messages
25568- (including stack traces and dynamic error messages)
25569- preserve enough information to use the word `void' when referring to types
25570- which are specified as such in source code.%
25558+ the value of an expression of type \VOID.%
2557125559}
2557225560
2557325561\LMHash{}%
@@ -25705,7 +25693,7 @@ \subsection{Type Void}
2570525693}
2570625694
2570725695\begin{dartCode}
25708- \FOR{} (Object x in <\VOID>[]) \{\} // \comment{Error.}
25696+ \FOR{} (Object? x in <\VOID>[]) \{\} // \comment{Error.}
2570925697\AWAIT{} \FOR{} (int x \IN{} new Stream<\VOID{}>.empty()) \{\} // \comment{Error.}
2571025698\FOR{} (\VOID{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK.}
2571125699\FOR (\VAR{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK, type of x inferred.}
0 commit comments