Chromium Code Reviews| Index: docs/language/dartLangSpec.tex |
| diff --git a/docs/language/dartLangSpec.tex b/docs/language/dartLangSpec.tex |
| index 44e846cf68a64ec44684977b2179c3719e95b50b..c4c482f1978e47832da16e7ba08ef95fce7efd20 100644 |
| --- a/docs/language/dartLangSpec.tex |
| +++ b/docs/language/dartLangSpec.tex |
| @@ -1782,7 +1782,8 @@ The scope of the \EXTENDS{} and \WITH{} clauses of a class $C$ is the type-param |
| \LMHash{} |
| %It is a compile-time error if the \EXTENDS{} clause of a class $C$ includes a type expression that does not denote a class available in the lexical scope of $C$. |
| -It is a compile-time error if the \EXTENDS{} clause of a class $C$ specifies an enumerated type (\ref{enums}), a malformed type or a deferred type (\ref{staticTypes}) as a superclass. |
| +It is a compile-time error if the \EXTENDS{} clause of a class $C$ specifies a type variable (\ref{generics}), a type alias (\ref{typedef}), an enumerated type (\ref{enums}), a malformed type, or a deferred type (\ref{staticTypes}) as a superclass. |
| +It is a compile-time error if the \EXTENDS{} clause of a class $C$ specifies type \DYNAMIC{} as a superinterface. |
| % too strict? Do we e want extends List<Undeclared> to work as List<dynamic>? |
| \commentary{ The type parameters of a generic class are available in the lexical scope of the superclass clause, potentially shadowing classes in the surrounding scope. The following code is therefore illegal and should cause a compile-time error: |
| @@ -1917,7 +1918,9 @@ A class has a set of direct superinterfaces. This set includes the interface of |
| The scope of the \IMPLEMENTS{} clause of a class $C$ is the type-parameter scope of $C$. |
| \LMHash{} |
| -It is a compile-time error if the \IMPLEMENTS{} clause of a class $C$ specifies a type variable as a superinterface. It is a compile-time error if the \IMPLEMENTS{} clause of a class $C$ specifies an enumerated type (\ref{enums}), a malformed type or deferred type (\ref{staticTypes}) as a superinterface. It is a compile-time error if the \IMPLEMENTS{} clause of a class $C$ specifies type \DYNAMIC{} as a superinterface. It is a compile-time error if the \IMPLEMENTS{} clause of a class $C$ specifies a type $T$ as a superinterface more than once. |
| +It is a compile-time error if the \IMPLEMENTS{} clause of a class $C$ specifies a type variable (\ref{generics}), a type alias (\ref{typedef}), an enumerated type (\ref{enums}), a malformed type, or a deferred type (\ref{staticTypes}) as a superinterface. |
| +It is a compile-time error if the \IMPLEMENTS{} clause of a class $C$ specifies type \DYNAMIC{} as a superinterface. |
| +It is a compile-time error if the \IMPLEMENTS{} clause of a class $C$ specifies a type $T$ as a superinterface more than once. |
| It is a compile-time error if the superclass of a class $C$ is specified as a superinterface of $C$. |
| \rationale{ |
| @@ -2090,8 +2093,10 @@ The restriction on constructors simplifies the construction of mixin application |
| \LMLabel{mixinApplication} |
| \LMHash{} |
| -A mixin may be applied to a superclass, yielding a new class. Mixin application occurs when a mixin is mixed into a class declaration via its \WITH{} clause. The mixin application may be used to extend a class per section (\ref{classes}); alternately, a class may be defined as a mixin application as described in this section. It is a compile-time error if the \WITH{} clause of a mixin application $C$ includes a deferred type expression. |
| - |
| +A mixin may be applied to a superclass, yielding a new class. |
| +Mixin application occurs when a mixin is mixed into a class declaration via its \WITH{} clause. |
| +The mixin application may be used to extend a class per section (\ref{classes}); alternately, a class may be defined as a mixin application as described in this section. |
| +It is a compile-time error if the \WITH{} clause of a mixin application $C$ includes a type variable (\ref{generics}), a type alias (\ref{typedef}), an enumerated type (\ref{enums}), a malformed type, or a deferred type (\ref{staticTypes}). |
|
Lasse Reichstein Nielsen
2016/12/16 12:12:02
It would be much easier if we had a definition of
eernst
2016/12/16 13:06:04
Right, which was basically what Gilad already had
|
| \begin{grammar} |
| {\bf mixinApplicationClass:} |