@@ -25985,7 +25985,7 @@ \subsection{Type FutureOr}
25985
25985
\end{itemize}
25986
25986
25987
25987
25988
- \subsection{Type Void }
25988
+ \subsection{Type \VOID }
25989
25989
\LMLabel{typeVoid}
25990
25990
25991
25991
\LMHash{}%
@@ -26015,22 +26015,10 @@ \subsection{Type Void}
26015
26015
\commentary{%
26016
26016
The type \VOID{} is a top type
26017
26017
(\ref{superBoundedTypes}),
26018
- so \VOID{} and \code{Object} are subtypes of each other
26018
+ so \VOID{} and \code{Object? } are subtypes of each other
26019
26019
(\ref{subtypes}),
26020
26020
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.%
26034
26022
}
26035
26023
26036
26024
\LMHash{}%
@@ -26180,7 +26168,7 @@ \subsection{Type Void}
26180
26168
\commentary{Here are some examples:}
26181
26169
26182
26170
\begin{dartCode}
26183
- \FOR{} (Object x in <\VOID>[]) \{\} // \comment{Error.}
26171
+ \FOR{} (Object? x in <\VOID>[]) \{\} // \comment{Error.}
26184
26172
\AWAIT{} \FOR{} (int x \IN{} new Stream<\VOID{}>.empty()) \{\} // \comment{Error.}
26185
26173
\FOR{} (\VOID{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK.}
26186
26174
\FOR (\VAR{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK, type of x inferred.}
0 commit comments