@@ -5618,7 +5618,12 @@ \subsection{Combined Member Signatures}
5618
5618
5619
5619
\LMHash{}%
5620
5620
Let \mall{} be the result of applying \TopMergeTypeName{} to
5621
- the elements in \Mall.
5621
+ \NormalizedTypeOfName{} of the elements in \Mall.
5622
+ \commentary{%
5623
+ Note that these types are mutual subtypes,
5624
+ and hence the normalized forms are structurally identical,
5625
+ modulo different choices of top type in some locations.%
5626
+ }
5622
5627
The combined member signature is then $m'$,
5623
5628
which is obtained from \mall{} by adding the modifier \COVARIANT{}
5624
5629
to each parameter $p$ (if it is not already present)
@@ -22527,6 +22532,8 @@ \subsection{Functions Dealing with Extreme Types}
22527
22532
\LMHash{}%
22528
22533
The functions are syntactic in nature such that termination is obvious.
22529
22534
In particular, they do not rely on subtyping.
22535
+ In each of these function definitions,
22536
+ the first applicable case must be used.
22530
22537
22531
22538
\LMHash{}%
22532
22539
The \Index{\TopMergeTypeName} of two types computes
@@ -22541,10 +22548,10 @@ \subsection{Functions Dealing with Extreme Types}
22541
22548
\item \DefEquals{\TopMergeType{\VOID}{\VOID}}{\code{\VOID}}.
22542
22549
\item \DefEquals{\TopMergeType{Object?}{\VOID}}{\code{Object?}}, and\\
22543
22550
\DefEquals{\TopMergeType{\VOID}{Object?}}{\code{Object?}}.
22544
- \item \DefEquals{\TopMergeType{\DYNAMIC}{\VOID}}{\code{Object?}}, and\\
22545
- \DefEquals{\TopMergeType{\VOID}{\DYNAMIC}}{\code{Object?}}
22546
22551
\item \DefEquals{\TopMergeType{Object?}{\DYNAMIC}}{\code{Object?}}, and\\
22547
22552
\DefEquals{\TopMergeType{\DYNAMIC}{Object?}}{\code{Object?}}.
22553
+ \item \DefEquals{\TopMergeType{\DYNAMIC}{\VOID}}{\code{Object?}}, and\\
22554
+ \DefEquals{\TopMergeType{\VOID}{\DYNAMIC}}{\code{Object?}}
22548
22555
\item \DefEquals{\TopMergeType{$T$?}{$S$?}}{\code{\TopMergeType{$T$}{$S$}?}}.
22549
22556
\item For all other types, the function is applied recursively.
22550
22557
@@ -22561,6 +22568,9 @@ \subsection{Functions Dealing with Extreme Types}
22561
22568
Note that \TopMergeTypeName{} is not defined for
22562
22569
types which are structurally different,
22563
22570
apart from being or containing different top types.
22571
+ When \TopMergeTypeName{} is used in this specification,
22572
+ each case where \TopMergeTypeName{} is undefined
22573
+ is handled explicitly.%
22564
22574
}
22565
22575
22566
22576
\rationale{%
@@ -22571,7 +22581,10 @@ \subsection{Functions Dealing with Extreme Types}
22571
22581
}
22572
22582
22573
22583
\commentary{%
22574
- For instance, if a class $C$ inherits a method $m$ that accepts
22584
+ For instance, \TopMergeTypeName{} is used during the computation of
22585
+ the interface of a class member which is declared
22586
+ in multiple superinterfaces.
22587
+ If a class $C$ inherits a method $m$ that accepts
22575
22588
an argument of type \code{List<\DYNAMIC>} from one superinterface,
22576
22589
and another method $m$ that accepts
22577
22590
an argument of type \code{List<\VOID>}
@@ -22585,7 +22598,8 @@ \subsection{Functions Dealing with Extreme Types}
22585
22598
\TopMergeTypeName{} of more than two types is defined by taking
22586
22599
\TopMergeTypeName{} of the first two,
22587
22600
and then recursively taking \TopMergeTypeName{} of the rest.
22588
-
22601
+ \commentary{The ordering of the arguments makes no difference.}
22602
+
22589
22603
\LMHash{}%
22590
22604
The \Index{\IsTopTypeName} predicate is true for any type which is in
22591
22605
the equivalence class of top types.
@@ -22600,7 +22614,7 @@ \subsection{Functions Dealing with Extreme Types}
22600
22614
\item \DefEquals{\IsTopType{$T$}}{\metavar{false}}, otherwise.
22601
22615
\end{itemize}
22602
22616
22603
- \LMHash{}%
22617
+ \noindent
22604
22618
The \Index{\IsObjectTypeName} predicate is true if{}f
22605
22619
the argument is a subtype and a supertype of \code{Object}.
22606
22620
@@ -22610,7 +22624,7 @@ \subsection{Functions Dealing with Extreme Types}
22610
22624
\item \DefEquals{\IsObjectType{$T$}}{\metavar{false}}, otherwise.
22611
22625
\end{itemize}
22612
22626
22613
- \LMHash{}%
22627
+ \noindent
22614
22628
The \Index{\IsBottomTypeName} predicate is true if{}f
22615
22629
the argument is a subtype of \code{Never}.
22616
22630
@@ -22621,7 +22635,7 @@ \subsection{Functions Dealing with Extreme Types}
22621
22635
\item \DefEquals{\IsBottomType{$T$}}{\metavar{false}}, otherwise.
22622
22636
\end{itemize}
22623
22637
22624
- \LMHash{}%
22638
+ \noindent
22625
22639
The \Index{\IsNullTypeName} predicate is true if{}f
22626
22640
the argument is a subtype and a supertype of \code{Null}.
22627
22641
@@ -22631,7 +22645,7 @@ \subsection{Functions Dealing with Extreme Types}
22631
22645
\item \DefEquals{\IsNullType{$T$}}{\metavar{false}}, otherwise.
22632
22646
\end{itemize}
22633
22647
22634
- \LMHash{}%
22648
+ \noindent
22635
22649
The \Index{\IsMoreTopTypeName} predicate defines a total order on
22636
22650
top and \code{Object} types.
22637
22651
@@ -22649,7 +22663,7 @@ \subsection{Functions Dealing with Extreme Types}
22649
22663
\IsMoreTopType{$T$}{$S$}}.
22650
22664
\end{itemize}
22651
22665
22652
- \LMHash{}%
22666
+ \noindent
22653
22667
The \Index{\IsMoreBottomTypeName} predicate defines an almost total order on
22654
22668
bottom and \code{Null} types.
22655
22669
\commentary{%
@@ -22674,8 +22688,6 @@ \subsection{Functions Dealing with Extreme Types}
22674
22688
\IsMoreBottomType{$T$}{$S$}}.
22675
22689
\end{itemize}
22676
22690
22677
- !!!TODO!!! Clean up this section: We should say that these definitions are used in order (first applicable case must be used). We should specify the acceptable arguments is each case, and argue that we're never calling them on anything which is not acceptable.
22678
-
22679
22691
22680
22692
\subsection{Type Normalization}
22681
22693
\LMLabel{typeNormalization}
0 commit comments