@@ -25981,7 +25981,7 @@ \subsection{Type FutureOr}
25981
25981
\end{itemize}
25982
25982
25983
25983
25984
- \subsection{Type Void }
25984
+ \subsection{Type \VOID }
25985
25985
\LMLabel{typeVoid}
25986
25986
25987
25987
\LMHash{}%
@@ -26011,22 +26011,10 @@ \subsection{Type Void}
26011
26011
\commentary{%
26012
26012
The type \VOID{} is a top type
26013
26013
(\ref{superBoundedTypes}),
26014
- so \VOID{} and \code{Object} are subtypes of each other
26014
+ so \VOID{} and \code{Object? } are subtypes of each other
26015
26015
(\ref{subtypes}),
26016
26016
which also implies that any object can be
26017
- the value of an expression of type \VOID.
26018
- %
26019
- Consequently, any instance of type \code{Type} which reifies the type \VOID{}
26020
- must compare equal (according to the \lit{==} operator \ref{equality})
26021
- to any instance of \code{Type} which reifies the type \code{Object}
26022
- (\ref{dynamicTypeSystem}).
26023
- It is not guaranteed that \code{identical(\VOID, Object)} evaluates to
26024
- the \TRUE{} object.
26025
- In fact, it is not recommended that implementations strive to achieve this,
26026
- because it may be more important to ensure that diagnostic messages
26027
- (including stack traces and dynamic error messages)
26028
- preserve enough information to use the word `void' when referring to types
26029
- which are specified as such in source code.%
26017
+ the value of an expression of type \VOID.%
26030
26018
}
26031
26019
26032
26020
\LMHash{}%
@@ -26162,7 +26150,7 @@ \subsection{Type Void}
26162
26150
\commentary{Here are some examples:}
26163
26151
26164
26152
\begin{dartCode}
26165
- \FOR{} (Object x in <\VOID>[]) \{\} // \comment{Error.}
26153
+ \FOR{} (Object? x in <\VOID>[]) \{\} // \comment{Error.}
26166
26154
\AWAIT{} \FOR{} (int x \IN{} new Stream<\VOID{}>.empty()) \{\} // \comment{Error.}
26167
26155
\FOR{} (\VOID{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK.}
26168
26156
\FOR (\VAR{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK, type of x inferred.}
0 commit comments