Skip to content

Commit b7fea80

Browse files
committed
Correction: Add definition of normalizedType/topMergeType for member signatures
1 parent c717d63 commit b7fea80

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
@@ -11593,7 +11593,7 @@ \subsubsection{Sets}
1159311593
and it is evaluated at run time.
1159411594
Only run-time set literals can be mutated after they are created.
1159511595
% This error can occur because being constant is a dynamic property, here.
11596-
Attempting to mutate a constant set literal
11596+
Attempting to mutate a constant set literal
1159711597
will result in a \DynamicError{dynamic error}.
1159811598

1159911599
\commentary{%
@@ -23289,6 +23289,34 @@ \subsection{Functions Dealing with Extreme Types}
2328923289
and then recursively taking \TopMergeTypeName{} of the rest.
2329023290
\commentary{The ordering of the arguments makes no difference.}
2329123291

23292+
\LMHash{}%
23293+
We generalize \TopMergeTypeName{} such that
23294+
it can be applied to two or more member signatures rather than types.
23295+
The case with more than two member signatures is defined in the same way as
23296+
the case with more than two types.
23297+
With member signatures $m_1$ and $m_2$
23298+
that are structurally identical modulo the choice of top types
23299+
and the occurrences of the modifier \COVARIANT,
23300+
\TopMergeType{$m_1$}{$m_2$} is a member signature $m$ such
23301+
that every pair of types $T_1$ and $T_2$ that occur in $m_1$ respectively $m_2$
23302+
yields \TopMergeType{$T_1$}{$T_2$} in the result,
23303+
the modifier \COVARIANT{} occurs on every parameter in $m$
23304+
where the corresponding parameter in $m_1$ or in $m_2$ has that modifier,
23305+
and all other non-type parts of $m_1$ and $m_2$ occur identically in the result.
23306+
23307+
\commentary{%
23308+
For example,
23309+
23310+
\noindent
23311+
\TopMergeType{\VOID\,\,m(List<\DYNAMIC>)}
23312+
{\DYNAMIC\,\,m(\COVARIANT\,\,List<Object?>)}
23313+
23314+
\noindent
23315+
is the member signature
23316+
\code{Object?\,\,m(\COVARIANT\,\,List<Object?>)}.%
23317+
}
23318+
23319+
2329223320
\LMHash{}%
2329323321
The \IndexCustom{\IsTopTypeName}{isTopType@\IsTopTypeName}
2329423322
predicate is true for any type which is in
@@ -23537,6 +23565,21 @@ \subsection{Type Normalization}
2353723565
\end{displaymath}
2353823566
}
2353923567

23568+
\LMHash{}%
23569+
We generalize \NormalizedTypeOfName{} such that
23570+
it can be applied to a member signature rather than a type.
23571+
This maps a member signature $m$ to a member signature $m'$ such
23572+
that every type $T$ that occurs in $m$ is replaced by
23573+
\NormalizedTypeOf{$T$}, and all other parts of $m'$ are identical to
23574+
the corresponding part of $m$.
23575+
23576+
\commentary{%
23577+
For example,
23578+
\NormalizedTypeOf{\VOID\,\,m(\COVARIANT\,\,FutureOr<Object>)}
23579+
is the member signature
23580+
\code{\VOID\,\,m(\COVARIANT\,\,Object)}.%
23581+
}
23582+
2354023583

2354123584
\subsection{The Canonical Syntax of Types}
2354223585
\LMLabel{theCanonicalSyntaxOfTypes}

0 commit comments

Comments
 (0)