Skip to content

Commit 3d33ee8

Browse files
authored
Add paragraph to make it explicit that "let $S$ be a class" includes the case where it goes via a type alias (#1644)
Before this commit, the section 'Type Aliases' of the language specification specifies that it is an error if a type alias expands to a type variable, and it is used as a mixin. So type aliases expanding to a mixin are already taken into consideration. However, it is not specified at various usage locations that type aliases are included. They are mentioned in connection with `extends` and `implements` and `with`, but, for instance, not in the section about mixin application. This commit adds a paragraph where it is stated that it is in general implied that a term `$S$` can be a type alias that transitively expands to a class when we say things like "let `$S$` be a class".
1 parent 5b097d2 commit 3d33ee8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

specification/dartLangSpec.tex

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20458,6 +20458,15 @@ \subsection{Type Aliases}
2045820458
\}
2045920459
\end{dartCode}
2046020460

20461+
\LMHash{}%
20462+
When we use phrases like `let $S$ be a class' or `assume that $S$ is a mixin',
20463+
it is understood that this includes the case where
20464+
$S$ is a \synt{typeName} denoting a type alias, or
20465+
$S$ is a parameterized type of the form
20466+
\syntax{<typeName> <typeArguments>}
20467+
where the type name denotes a type alias,
20468+
and the transitive alias expansion of $S$ denotes a class respectively a mixin.
20469+
2046120470

2046220471
\subsection{Subtypes}
2046320472
\LMLabel{subtypes}

0 commit comments

Comments
 (0)