Skip to content

Commit 2ff88c4

Browse files
committed
Add missing updates in section typeVoid
1 parent d748ddc commit 2ff88c4

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
@@ -25981,7 +25981,7 @@ \subsection{Type FutureOr}
2598125981
\end{itemize}
2598225982

2598325983

25984-
\subsection{Type Void}
25984+
\subsection{Type \VOID}
2598525985
\LMLabel{typeVoid}
2598625986

2598725987
\LMHash{}%
@@ -26011,22 +26011,10 @@ \subsection{Type Void}
2601126011
\commentary{%
2601226012
The type \VOID{} is a top type
2601326013
(\ref{superBoundedTypes}),
26014-
so \VOID{} and \code{Object} are subtypes of each other
26014+
so \VOID{} and \code{Object?} are subtypes of each other
2601526015
(\ref{subtypes}),
2601626016
which also implies that any object can be
26017-
the value of an expression of type \VOID.
26018-
%
26019-
Consequently, any instance of type \code{Type} which reifies the type \VOID{}
26020-
must compare equal (according to the \lit{==} operator \ref{equality})
26021-
to any instance of \code{Type} which reifies the type \code{Object}
26022-
(\ref{dynamicTypeSystem}).
26023-
It is not guaranteed that \code{identical(\VOID, Object)} evaluates to
26024-
the \TRUE{} object.
26025-
In fact, it is not recommended that implementations strive to achieve this,
26026-
because it may be more important to ensure that diagnostic messages
26027-
(including stack traces and dynamic error messages)
26028-
preserve enough information to use the word `void' when referring to types
26029-
which are specified as such in source code.%
26017+
the value of an expression of type \VOID.%
2603026018
}
2603126019

2603226020
\LMHash{}%
@@ -26162,7 +26150,7 @@ \subsection{Type Void}
2616226150
\commentary{Here are some examples:}
2616326151

2616426152
\begin{dartCode}
26165-
\FOR{} (Object x in <\VOID>[]) \{\} // \comment{Error.}
26153+
\FOR{} (Object? x in <\VOID>[]) \{\} // \comment{Error.}
2616626154
\AWAIT{} \FOR{} (int x \IN{} new Stream<\VOID{}>.empty()) \{\} // \comment{Error.}
2616726155
\FOR{} (\VOID{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK.}
2616826156
\FOR (\VAR{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK, type of x inferred.}

0 commit comments

Comments
 (0)