@@ -25359,7 +25359,7 @@ \subsection{Type FutureOr}
25359
25359
\end{itemize}
25360
25360
25361
25361
25362
- \subsection{Type Void }
25362
+ \subsection{Type \VOID }
25363
25363
\LMLabel{typeVoid}
25364
25364
25365
25365
\LMHash{}%
@@ -25389,22 +25389,10 @@ \subsection{Type Void}
25389
25389
\commentary{%
25390
25390
The type \VOID{} is a top type
25391
25391
(\ref{superBoundedTypes}),
25392
- so \VOID{} and \code{Object} are subtypes of each other
25392
+ so \VOID{} and \code{Object? } are subtypes of each other
25393
25393
(\ref{subtypes}),
25394
25394
which 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.%
25408
25396
}
25409
25397
25410
25398
\LMHash{}%
@@ -25542,7 +25530,7 @@ \subsection{Type Void}
25542
25530
}
25543
25531
25544
25532
\begin{dartCode}
25545
- \FOR{} (Object x in <\VOID>[]) \{\} // \comment{Error.}
25533
+ \FOR{} (Object? x in <\VOID>[]) \{\} // \comment{Error.}
25546
25534
\AWAIT{} \FOR{} (int x \IN{} new Stream<\VOID{}>.empty()) \{\} // \comment{Error.}
25547
25535
\FOR{} (\VOID{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK.}
25548
25536
\FOR (\VAR{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK, type of x inferred.}
0 commit comments