Skip to content

Commit c2288c3

Browse files
committed
Correction: Add definition of normalizedType/topMergeType for member signatures
1 parent 68c4f55 commit c2288c3

File tree

1 file changed

+44
-1
lines changed

1 file changed

+44
-1
lines changed

specification/dartLangSpec.tex

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11575,7 +11575,7 @@ \subsubsection{Sets}
1157511575
and it is evaluated at run time.
1157611576
Only run-time set literals can be mutated after they are created.
1157711577
% This error can occur because being constant is a dynamic property, here.
11578-
Attempting to mutate a constant set literal
11578+
Attempting to mutate a constant set literal
1157911579
will result in a \DynamicError{dynamic error}.
1158011580

1158111581
\commentary{%
@@ -23269,6 +23269,34 @@ \subsection{Functions Dealing with Extreme Types}
2326923269
and then recursively taking \TopMergeTypeName{} of the rest.
2327023270
\commentary{The ordering of the arguments makes no difference.}
2327123271

23272+
\LMHash{}%
23273+
We generalize \TopMergeTypeName{} such that
23274+
it can be applied to two or more member signatures rather than types.
23275+
The case with more than two member signatures is defined in the same way as
23276+
the case with more than two types.
23277+
With member signatures $m_1$ and $m_2$
23278+
that are structurally identical modulo the choice of top types
23279+
and the occurrences of the modifier \COVARIANT,
23280+
\TopMergeType{$m_1$}{$m_2$} is a member signature $m$ such
23281+
that every pair of types $T_1$ and $T_2$ that occur in $m_1$ respectively $m_2$
23282+
yields \TopMergeType{$T_1$}{$T_2$} in the result,
23283+
the modifier \COVARIANT{} occurs on every parameter in $m$
23284+
where the corresponding parameter in $m_1$ or in $m_2$ has that modifier,
23285+
and all other non-type parts of $m_1$ and $m_2$ occur identically in the result.
23286+
23287+
\commentary{%
23288+
For example,
23289+
23290+
\noindent
23291+
\TopMergeType{\VOID\,\,m(List<\DYNAMIC>)}
23292+
{\DYNAMIC\,\,m(\COVARIANT\,\,List<Object?>)}
23293+
23294+
\noindent
23295+
is the member signature
23296+
\code{Object?\,\,m(\COVARIANT\,\,List<Object?>)}.%
23297+
}
23298+
23299+
2327223300
\LMHash{}%
2327323301
The \IndexCustom{\IsTopTypeName}{isTopType@\IsTopTypeName}
2327423302
predicate is true for any type which is in
@@ -23517,6 +23545,21 @@ \subsection{Type Normalization}
2351723545
\end{displaymath}
2351823546
}
2351923547

23548+
\LMHash{}%
23549+
We generalize \NormalizedTypeOfName{} such that
23550+
it can be applied to a member signature rather than a type.
23551+
This maps a member signature $m$ to a member signature $m'$ such
23552+
that every type $T$ that occurs in $m$ is replaced by
23553+
\NormalizedTypeOf{$T$}, and all other parts of $m'$ are identical to
23554+
the corresponding part of $m$.
23555+
23556+
\commentary{%
23557+
For example,
23558+
\NormalizedTypeOf{\VOID\,\,m(\COVARIANT\,\,FutureOr<Object>)}
23559+
is the member signature
23560+
\code{\VOID\,\,m(\COVARIANT\,\,Object)}.%
23561+
}
23562+
2352023563

2352123564
\subsection{The Canonical Syntax of Types}
2352223565
\LMLabel{theCanonicalSyntaxOfTypes}

0 commit comments

Comments
 (0)