Skip to content

Commit d118c7f

Browse files
committed
Added changelog entry for instantiate-to-bound integration + commentary
Change-Id: Ia6b39eb9087e9101c3e652e07bc62a7bbdfbb391 Reviewed-on: https://dart-review.googlesource.com/c/87062 Reviewed-by: Lasse R.H. Nielsen <[email protected]>
1 parent 526b11d commit d118c7f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/language/dartLangSpec.tex

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@
155155
% which in particular means that the notion of being a more specific type
156156
% is eliminated, and function types are made contravariant in their
157157
% parameter types.
158+
% - Integrate instantiation to bound. This introduces the notions of raw
159+
% types, the raw-depends relation, and simple bounds; and it specifies
160+
% the algorithm which is used to expand a raw type (e.g., `C`) to a
161+
% parameterized type (e.g., `C<int>`).
158162
%
159163
% 1.15
160164
% - Change how language specification describes control flow.
@@ -4992,6 +4996,18 @@ \subsection{Instantiation to Bound}
49924996
because everything said about raw types
49934997
is applicable to raw type expressions in the obvious manner.
49944998

4999+
\commentary{%
5000+
For instance, with the declaration \code{Type listType() => List;},
5001+
evaluation of the raw type expression \code{List} in the body yields
5002+
an instance of class \code{Type} reifying \code{List<dynamic>},
5003+
because \code{List} is subject to instantiation to bound.
5004+
Note that \code{List<dynamic>} is not syntactically an expression,
5005+
but it is still possible to get access to
5006+
a \code{Type} instance reifying \code{List<dynamic>}
5007+
without instantiation to bound,
5008+
because it can be the value of a type variable.%
5009+
}
5010+
49955011
\rationale{%
49965012
A raw type cannot denote a higher-kinded type
49975013
(Dart does not support such types),

0 commit comments

Comments
 (0)