@@ -25522,7 +25522,7 @@ \subsection{Type FutureOr}
25522
25522
\end{itemize}
25523
25523
25524
25524
25525
- \subsection{Type Void }
25525
+ \subsection{Type \VOID }
25526
25526
\LMLabel{typeVoid}
25527
25527
25528
25528
\LMHash{}%
@@ -25552,22 +25552,10 @@ \subsection{Type Void}
25552
25552
\commentary{%
25553
25553
The type \VOID{} is a top type
25554
25554
(\ref{superBoundedTypes}),
25555
- so \VOID{} and \code{Object} are subtypes of each other
25555
+ so \VOID{} and \code{Object? } are subtypes of each other
25556
25556
(\ref{subtypes}),
25557
25557
which also implies that any object can be
25558
- the value of an expression of type \VOID.
25559
- %
25560
- Consequently, any instance of type \code{Type} which reifies the type \VOID{}
25561
- must compare equal (according to the \lit{==} operator \ref{equality})
25562
- to any instance of \code{Type} which reifies the type \code{Object}
25563
- (\ref{dynamicTypeSystem}).
25564
- It is not guaranteed that \code{identical(\VOID, Object)} evaluates to
25565
- the \TRUE{} object.
25566
- In fact, it is not recommended that implementations strive to achieve this,
25567
- because it may be more important to ensure that diagnostic messages
25568
- (including stack traces and dynamic error messages)
25569
- preserve enough information to use the word `void' when referring to types
25570
- which are specified as such in source code.%
25558
+ the value of an expression of type \VOID.%
25571
25559
}
25572
25560
25573
25561
\LMHash{}%
@@ -25705,7 +25693,7 @@ \subsection{Type Void}
25705
25693
}
25706
25694
25707
25695
\begin{dartCode}
25708
- \FOR{} (Object x in <\VOID>[]) \{\} // \comment{Error.}
25696
+ \FOR{} (Object? x in <\VOID>[]) \{\} // \comment{Error.}
25709
25697
\AWAIT{} \FOR{} (int x \IN{} new Stream<\VOID{}>.empty()) \{\} // \comment{Error.}
25710
25698
\FOR{} (\VOID{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK.}
25711
25699
\FOR (\VAR{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK, type of x inferred.}
0 commit comments