@@ -25531,7 +25531,7 @@ \subsection{Type FutureOr}
25531
25531
\end{itemize}
25532
25532
25533
25533
25534
- \subsection{Type Void }
25534
+ \subsection{Type \VOID }
25535
25535
\LMLabel{typeVoid}
25536
25536
25537
25537
\LMHash{}%
@@ -25561,22 +25561,10 @@ \subsection{Type Void}
25561
25561
\commentary{%
25562
25562
The type \VOID{} is a top type
25563
25563
(\ref{superBoundedTypes}),
25564
- so \VOID{} and \code{Object} are subtypes of each other
25564
+ so \VOID{} and \code{Object? } are subtypes of each other
25565
25565
(\ref{subtypes}),
25566
25566
which also implies that any object can be
25567
- the value of an expression of type \VOID.
25568
- %
25569
- Consequently, any instance of type \code{Type} which reifies the type \VOID{}
25570
- must compare equal (according to the \lit{==} operator \ref{equality})
25571
- to any instance of \code{Type} which reifies the type \code{Object}
25572
- (\ref{dynamicTypeSystem}).
25573
- It is not guaranteed that \code{identical(\VOID, Object)} evaluates to
25574
- the \TRUE{} object.
25575
- In fact, it is not recommended that implementations strive to achieve this,
25576
- because it may be more important to ensure that diagnostic messages
25577
- (including stack traces and dynamic error messages)
25578
- preserve enough information to use the word `void' when referring to types
25579
- which are specified as such in source code.%
25567
+ the value of an expression of type \VOID.%
25580
25568
}
25581
25569
25582
25570
\LMHash{}%
@@ -25714,7 +25702,7 @@ \subsection{Type Void}
25714
25702
}
25715
25703
25716
25704
\begin{dartCode}
25717
- \FOR{} (Object x in <\VOID>[]) \{\} // \comment{Error.}
25705
+ \FOR{} (Object? x in <\VOID>[]) \{\} // \comment{Error.}
25718
25706
\AWAIT{} \FOR{} (int x \IN{} new Stream<\VOID{}>.empty()) \{\} // \comment{Error.}
25719
25707
\FOR{} (\VOID{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK.}
25720
25708
\FOR (\VAR{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK, type of x inferred.}
0 commit comments