Skip to content

Commit eaecbfb

Browse files
committed
Add missing updates in section typeVoid
1 parent a6441b3 commit eaecbfb

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

specification/dartLangSpec.tex

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26056,7 +26056,7 @@ \subsection{Type FutureOr}
2605626056
\end{itemize}
2605726057

2605826058

26059-
\subsection{Type Void}
26059+
\subsection{Type \VOID}
2606026060
\LMLabel{typeVoid}
2606126061

2606226062
\LMHash{}%
@@ -26086,22 +26086,10 @@ \subsection{Type Void}
2608626086
\commentary{%
2608726087
The type \VOID{} is a top type
2608826088
(\ref{superBoundedTypes}),
26089-
so \VOID{} and \code{Object} are subtypes of each other
26089+
so \VOID{} and \code{Object?} are subtypes of each other
2609026090
(\ref{subtypes}),
2609126091
which also implies that any object can be
26092-
the value of an expression of type \VOID.
26093-
%
26094-
Consequently, any instance of type \code{Type} which reifies the type \VOID{}
26095-
must compare equal (according to the \lit{==} operator \ref{equality})
26096-
to any instance of \code{Type} which reifies the type \code{Object}
26097-
(\ref{dynamicTypeSystem}).
26098-
It is not guaranteed that \code{identical(\VOID, Object)} evaluates to
26099-
the \TRUE{} object.
26100-
In fact, it is not recommended that implementations strive to achieve this,
26101-
because it may be more important to ensure that diagnostic messages
26102-
(including stack traces and dynamic error messages)
26103-
preserve enough information to use the word `void' when referring to types
26104-
which are specified as such in source code.%
26092+
the value of an expression of type \VOID.%
2610526093
}
2610626094

2610726095
\LMHash{}%
@@ -26251,7 +26239,7 @@ \subsection{Type Void}
2625126239
\commentary{Here are some examples:}
2625226240

2625326241
\begin{dartCode}
26254-
\FOR{} (Object x in <\VOID>[]) \{\} // \comment{Error.}
26242+
\FOR{} (Object? x in <\VOID>[]) \{\} // \comment{Error.}
2625526243
\AWAIT{} \FOR{} (int x \IN{} new Stream<\VOID{}>.empty()) \{\} // \comment{Error.}
2625626244
\FOR{} (\VOID{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK.}
2625726245
\FOR (\VAR{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK, type of x inferred.}

0 commit comments

Comments
 (0)