@@ -25542,7 +25542,7 @@ \subsection{Type FutureOr}
2554225542\end{itemize}
2554325543
2554425544
25545- \subsection{Type Void }
25545+ \subsection{Type \VOID }
2554625546\LMLabel{typeVoid}
2554725547
2554825548\LMHash{}%
@@ -25572,22 +25572,10 @@ \subsection{Type Void}
2557225572\commentary{%
2557325573The type \VOID{} is a top type
2557425574(\ref{superBoundedTypes}),
25575- so \VOID{} and \code{Object} are subtypes of each other
25575+ so \VOID{} and \code{Object? } are subtypes of each other
2557625576(\ref{subtypes}),
2557725577which also implies that any object can be
25578- the value of an expression of type \VOID.
25579- %
25580- Consequently, any instance of type \code{Type} which reifies the type \VOID{}
25581- must compare equal (according to the \lit{==} operator \ref{equality})
25582- to any instance of \code{Type} which reifies the type \code{Object}
25583- (\ref{dynamicTypeSystem}).
25584- It is not guaranteed that \code{identical(\VOID, Object)} evaluates to
25585- the \TRUE{} object.
25586- In fact, it is not recommended that implementations strive to achieve this,
25587- because it may be more important to ensure that diagnostic messages
25588- (including stack traces and dynamic error messages)
25589- preserve enough information to use the word `void' when referring to types
25590- which are specified as such in source code.%
25578+ the value of an expression of type \VOID.%
2559125579}
2559225580
2559325581\LMHash{}%
@@ -25725,7 +25713,7 @@ \subsection{Type Void}
2572525713}
2572625714
2572725715\begin{dartCode}
25728- \FOR{} (Object x in <\VOID>[]) \{\} // \comment{Error.}
25716+ \FOR{} (Object? x in <\VOID>[]) \{\} // \comment{Error.}
2572925717\AWAIT{} \FOR{} (int x \IN{} new Stream<\VOID{}>.empty()) \{\} // \comment{Error.}
2573025718\FOR{} (\VOID{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK.}
2573125719\FOR (\VAR{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK, type of x inferred.}
0 commit comments