Skip to content

Commit 6e270ba

Browse files
committed
Add missing updates in section typeVoid
1 parent ac8bbd5 commit 6e270ba

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
@@ -25531,7 +25531,7 @@ \subsection{Type FutureOr}
2553125531
\end{itemize}
2553225532

2553325533

25534-
\subsection{Type Void}
25534+
\subsection{Type \VOID}
2553525535
\LMLabel{typeVoid}
2553625536

2553725537
\LMHash{}%
@@ -25561,22 +25561,10 @@ \subsection{Type Void}
2556125561
\commentary{%
2556225562
The type \VOID{} is a top type
2556325563
(\ref{superBoundedTypes}),
25564-
so \VOID{} and \code{Object} are subtypes of each other
25564+
so \VOID{} and \code{Object?} are subtypes of each other
2556525565
(\ref{subtypes}),
2556625566
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.%
2558025568
}
2558125569

2558225570
\LMHash{}%
@@ -25714,7 +25702,7 @@ \subsection{Type Void}
2571425702
}
2571525703

2571625704
\begin{dartCode}
25717-
\FOR{} (Object x in <\VOID>[]) \{\} // \comment{Error.}
25705+
\FOR{} (Object? x in <\VOID>[]) \{\} // \comment{Error.}
2571825706
\AWAIT{} \FOR{} (int x \IN{} new Stream<\VOID{}>.empty()) \{\} // \comment{Error.}
2571925707
\FOR{} (\VOID{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK.}
2572025708
\FOR (\VAR{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK, type of x inferred.}

0 commit comments

Comments
 (0)