@@ -25359,7 +25359,7 @@ \subsection{Type FutureOr}
2535925359\end{itemize}
2536025360
2536125361
25362- \subsection{Type Void }
25362+ \subsection{Type \VOID }
2536325363\LMLabel{typeVoid}
2536425364
2536525365\LMHash{}%
@@ -25389,22 +25389,10 @@ \subsection{Type Void}
2538925389\commentary{%
2539025390The type \VOID{} is a top type
2539125391(\ref{superBoundedTypes}),
25392- so \VOID{} and \code{Object} are subtypes of each other
25392+ so \VOID{} and \code{Object? } are subtypes of each other
2539325393(\ref{subtypes}),
2539425394which also implies that any object can be
25395- the value of an expression of type \VOID.
25396- %
25397- Consequently, any instance of type \code{Type} which reifies the type \VOID{}
25398- must compare equal (according to the \lit{==} operator \ref{equality})
25399- to any instance of \code{Type} which reifies the type \code{Object}
25400- (\ref{dynamicTypeSystem}).
25401- It is not guaranteed that \code{identical(\VOID, Object)} evaluates to
25402- the \TRUE{} object.
25403- In fact, it is not recommended that implementations strive to achieve this,
25404- because it may be more important to ensure that diagnostic messages
25405- (including stack traces and dynamic error messages)
25406- preserve enough information to use the word `void' when referring to types
25407- which are specified as such in source code.%
25395+ the value of an expression of type \VOID.%
2540825396}
2540925397
2541025398\LMHash{}%
@@ -25542,7 +25530,7 @@ \subsection{Type Void}
2554225530}
2554325531
2554425532\begin{dartCode}
25545- \FOR{} (Object x in <\VOID>[]) \{\} // \comment{Error.}
25533+ \FOR{} (Object? x in <\VOID>[]) \{\} // \comment{Error.}
2554625534\AWAIT{} \FOR{} (int x \IN{} new Stream<\VOID{}>.empty()) \{\} // \comment{Error.}
2554725535\FOR{} (\VOID{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK.}
2554825536\FOR (\VAR{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK, type of x inferred.}
0 commit comments