Skip to content

Commit 64ce120

Browse files
authored
Change flatten to include "bounded" in the first case (#2707)
Change flatten to include "bounded" in the first case. This is needed in order to ensure, e.g., with `X extends Future<A>?` that `flatten(X)` is `A?`. This PR also adds a front matter comment about this change, and it changes the subheaders used in the front matter comment to use the format <month> <year>.
1 parent 0129f5a commit 64ce120

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

specification/dartLangSpec.tex

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
\makeindex
1515
\title{Dart Programming Language Specification\\
1616
{6th edition draft}\\
17-
{\large Version 2.15-dev}}
17+
{\large Version 2.13-dev}}
1818
\author{}
1919

2020
% For information about Location Markers (and in particular the
@@ -26,6 +26,19 @@
2626
%
2727
% Significant changes to the specification.
2828
%
29+
% Note that the version numbers used below (up to 2.15) were associated with
30+
% the currently released language and tools at the time of the spec change,
31+
% they were not aligned with the actual version of the language which is being
32+
% specified in that version of this document. This is highly misleading, so we
33+
% changed the subtitles to be a month rather than a version number. Similarly,
34+
% the 'Version' specified on the front page has been changed to indicate the
35+
% version of the language which will actually be specified by the next stable
36+
% release of this document.
37+
%
38+
% Dec 2022
39+
% - Change the definition of the type function 'flatten' to resolve soundness
40+
% issue, cf. SDK issue #49396.
41+
%
2942
% 2.15
3043
% - Allow generic instantiation of expressions with a generic function type
3144
% (until now, it was an error unless the expression denoted a declaration).
@@ -11268,11 +11281,11 @@ \subsection{Function Expressions}
1126811281
which is used below and in other sections, as follows:
1126911282

1127011283
\begin{itemize}
11271-
\item{} If $T$ is \code{$S$?}\ for some $S$
11272-
then \DefEquals{\flatten{T}}{\code{\flatten{S}?}}.
11284+
\item{} If $T$ is \code{$S$?}\ bounded
11285+
(\ref{bindingActualsToFormals})
11286+
for some $S$ then \DefEquals{\flatten{T}}{\code{\flatten{S}?}}.
1127311287

1127411288
\item{} If $T$ is \code{FutureOr<$S$>} bounded
11275-
(\ref{bindingActualsToFormals})
1127611289
then \DefEquals{\flatten{T}}{S}.
1127711290

1127811291
\item{} If $T$ implements \code{Future<$S$>}

0 commit comments

Comments
 (0)