@@ -93,6 +93,8 @@ It is a compile-time error unless satisfaction of the declared bounds
93
93
_ B<sub >1</sub > .. B<sub >k</sub >_ implies that the right hand side is
94
94
regular-bounded, and all types that occur as subterms of the right hand
95
95
side are well-bounded.
96
+ Any self reference in a type alias, either directly or recursively via another
97
+ type alias, is a compile-time error.
96
98
97
99
Let ` F<T1..Tn> ` be a parameterized type where ` F ` denotes a declaration of
98
100
the form
@@ -112,6 +114,16 @@ evaluated as an expression, it is subject to instantiation to bound.
112
114
* This treatment of generic type aliases is again the same as it was
113
115
previously, but it involves a larger set of types.*
114
116
117
+ * Note that type aliases introduce types and not classes. Consequently, a
118
+ type alias can ** not** be used in a position where a class is expected: in the
119
+ ` extends ` , ` with ` , ` implements ` , or ` on ` clause of a class or mixin
120
+ declaration; for a static member access; or in an instance creation
121
+ expression (` new F() ` , ` const F<int>() ` ). On the other hand, it ** can** be
122
+ used as a type annotation, as a type argument, as part of a function type
123
+ or function signature, as a type literal, in an ` on ` clause of a ` try `
124
+ statement, in a type test (` e is F ` ), and in a type cast (` e as F ` ).*
125
+
126
+
115
127
### Dynamic Semantics
116
128
117
129
* The dynamic semantics relies on elaborations on the program performed
@@ -134,4 +146,4 @@ fresh type variable bound to the denoted type.
134
146
135
147
## Versions
136
148
137
- * Nov 1st , 2018, version 0.1: Initial version of this document.
149
+ * Nov 6th , 2018, version 0.1: Initial version of this document.
0 commit comments