@@ -25542,7 +25542,7 @@ \subsection{Type FutureOr}
25542
25542
\end{itemize}
25543
25543
25544
25544
25545
- \subsection{Type Void }
25545
+ \subsection{Type \VOID }
25546
25546
\LMLabel{typeVoid}
25547
25547
25548
25548
\LMHash{}%
@@ -25572,22 +25572,10 @@ \subsection{Type Void}
25572
25572
\commentary{%
25573
25573
The type \VOID{} is a top type
25574
25574
(\ref{superBoundedTypes}),
25575
- so \VOID{} and \code{Object} are subtypes of each other
25575
+ so \VOID{} and \code{Object? } are subtypes of each other
25576
25576
(\ref{subtypes}),
25577
25577
which 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.%
25591
25579
}
25592
25580
25593
25581
\LMHash{}%
@@ -25725,7 +25713,7 @@ \subsection{Type Void}
25725
25713
}
25726
25714
25727
25715
\begin{dartCode}
25728
- \FOR{} (Object x in <\VOID>[]) \{\} // \comment{Error.}
25716
+ \FOR{} (Object? x in <\VOID>[]) \{\} // \comment{Error.}
25729
25717
\AWAIT{} \FOR{} (int x \IN{} new Stream<\VOID{}>.empty()) \{\} // \comment{Error.}
25730
25718
\FOR{} (\VOID{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK.}
25731
25719
\FOR (\VAR{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK, type of x inferred.}
0 commit comments