|
155 | 155 | % which in particular means that the notion of being a more specific type
|
156 | 156 | % is eliminated, and function types are made contravariant in their
|
157 | 157 | % 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>`). |
158 | 162 | %
|
159 | 163 | % 1.15
|
160 | 164 | % - Change how language specification describes control flow.
|
@@ -4992,6 +4996,18 @@ \subsection{Instantiation to Bound}
|
4992 | 4996 | because everything said about raw types
|
4993 | 4997 | is applicable to raw type expressions in the obvious manner.
|
4994 | 4998 |
|
| 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 | + |
4995 | 5011 | \rationale{%
|
4996 | 5012 | A raw type cannot denote a higher-kinded type
|
4997 | 5013 | (Dart does not support such types),
|
|
0 commit comments