@@ -5393,7 +5393,12 @@ \subsection{Combined Member Signatures}
5393
5393
5394
5394
\LMHash{}%
5395
5395
Let \mall{} be the result of applying \TopMergeTypeName{} to
5396
- the elements in \Mall.
5396
+ \NormalizedTypeOfName{} of the elements in \Mall.
5397
+ \commentary{%
5398
+ Note that these types are mutual subtypes,
5399
+ and hence the normalized forms are structurally identical,
5400
+ modulo different choices of top type in some locations.%
5401
+ }
5397
5402
The combined member signature is then $m'$,
5398
5403
which is obtained from \mall{} by adding the modifier \COVARIANT{}
5399
5404
to each parameter $p$ (if it is not already present)
@@ -22024,6 +22029,8 @@ \subsection{Functions Dealing with Extreme Types}
22024
22029
\LMHash{}%
22025
22030
The functions are syntactic in nature such that termination is obvious.
22026
22031
In particular, they do not rely on subtyping.
22032
+ In each of these function definitions,
22033
+ the first applicable case must be used.
22027
22034
22028
22035
\LMHash{}%
22029
22036
The \Index{\TopMergeTypeName} of two types computes
@@ -22038,10 +22045,10 @@ \subsection{Functions Dealing with Extreme Types}
22038
22045
\item \DefEquals{\TopMergeType{\VOID}{\VOID}}{\code{\VOID}}.
22039
22046
\item \DefEquals{\TopMergeType{Object?}{\VOID}}{\code{Object?}}, and\\
22040
22047
\DefEquals{\TopMergeType{\VOID}{Object?}}{\code{Object?}}.
22041
- \item \DefEquals{\TopMergeType{\DYNAMIC}{\VOID}}{\code{Object?}}, and\\
22042
- \DefEquals{\TopMergeType{\VOID}{\DYNAMIC}}{\code{Object?}}
22043
22048
\item \DefEquals{\TopMergeType{Object?}{\DYNAMIC}}{\code{Object?}}, and\\
22044
22049
\DefEquals{\TopMergeType{\DYNAMIC}{Object?}}{\code{Object?}}.
22050
+ \item \DefEquals{\TopMergeType{\DYNAMIC}{\VOID}}{\code{Object?}}, and\\
22051
+ \DefEquals{\TopMergeType{\VOID}{\DYNAMIC}}{\code{Object?}}
22045
22052
\item \DefEquals{\TopMergeType{$T$?}{$S$?}}{\code{\TopMergeType{$T$}{$S$}?}}.
22046
22053
\item For all other types, the function is applied recursively.
22047
22054
@@ -22058,6 +22065,9 @@ \subsection{Functions Dealing with Extreme Types}
22058
22065
Note that \TopMergeTypeName{} is not defined for
22059
22066
types which are structurally different,
22060
22067
apart from being or containing different top types.
22068
+ When \TopMergeTypeName{} is used in this specification,
22069
+ each case where \TopMergeTypeName{} is undefined
22070
+ is handled explicitly.%
22061
22071
}
22062
22072
22063
22073
\rationale{%
@@ -22068,7 +22078,10 @@ \subsection{Functions Dealing with Extreme Types}
22068
22078
}
22069
22079
22070
22080
\commentary{%
22071
- For instance, if a class $C$ inherits a method $m$ that accepts
22081
+ For instance, \TopMergeTypeName{} is used during the computation of
22082
+ the interface of a class member which is declared
22083
+ in multiple superinterfaces.
22084
+ If a class $C$ inherits a method $m$ that accepts
22072
22085
an argument of type \code{List<\DYNAMIC>} from one superinterface,
22073
22086
and another method $m$ that accepts
22074
22087
an argument of type \code{List<\VOID>}
@@ -22082,7 +22095,8 @@ \subsection{Functions Dealing with Extreme Types}
22082
22095
\TopMergeTypeName{} of more than two types is defined by taking
22083
22096
\TopMergeTypeName{} of the first two,
22084
22097
and then recursively taking \TopMergeTypeName{} of the rest.
22085
-
22098
+ \commentary{The ordering of the arguments makes no difference.}
22099
+
22086
22100
\LMHash{}%
22087
22101
The \Index{\IsTopTypeName} predicate is true for any type which is in
22088
22102
the equivalence class of top types.
@@ -22097,7 +22111,7 @@ \subsection{Functions Dealing with Extreme Types}
22097
22111
\item \DefEquals{\IsTopType{$T$}}{\metavar{false}}, otherwise.
22098
22112
\end{itemize}
22099
22113
22100
- \LMHash{}%
22114
+ \noindent
22101
22115
The \Index{\IsObjectTypeName} predicate is true if{}f
22102
22116
the argument is a subtype and a supertype of \code{Object}.
22103
22117
@@ -22107,7 +22121,7 @@ \subsection{Functions Dealing with Extreme Types}
22107
22121
\item \DefEquals{\IsObjectType{$T$}}{\metavar{false}}, otherwise.
22108
22122
\end{itemize}
22109
22123
22110
- \LMHash{}%
22124
+ \noindent
22111
22125
The \Index{\IsBottomTypeName} predicate is true if{}f
22112
22126
the argument is a subtype of \code{Never}.
22113
22127
@@ -22118,7 +22132,7 @@ \subsection{Functions Dealing with Extreme Types}
22118
22132
\item \DefEquals{\IsBottomType{$T$}}{\metavar{false}}, otherwise.
22119
22133
\end{itemize}
22120
22134
22121
- \LMHash{}%
22135
+ \noindent
22122
22136
The \Index{\IsNullTypeName} predicate is true if{}f
22123
22137
the argument is a subtype and a supertype of \code{Null}.
22124
22138
@@ -22128,7 +22142,7 @@ \subsection{Functions Dealing with Extreme Types}
22128
22142
\item \DefEquals{\IsNullType{$T$}}{\metavar{false}}, otherwise.
22129
22143
\end{itemize}
22130
22144
22131
- \LMHash{}%
22145
+ \noindent
22132
22146
The \Index{\IsMoreTopTypeName} predicate defines a total order on
22133
22147
top and \code{Object} types.
22134
22148
@@ -22146,7 +22160,7 @@ \subsection{Functions Dealing with Extreme Types}
22146
22160
\IsMoreTopType{$T$}{$S$}}.
22147
22161
\end{itemize}
22148
22162
22149
- \LMHash{}%
22163
+ \noindent
22150
22164
The \Index{\IsMoreBottomTypeName} predicate defines an almost total order on
22151
22165
bottom and \code{Null} types.
22152
22166
\commentary{%
@@ -22171,8 +22185,6 @@ \subsection{Functions Dealing with Extreme Types}
22171
22185
\IsMoreBottomType{$T$}{$S$}}.
22172
22186
\end{itemize}
22173
22187
22174
- !!!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.
22175
-
22176
22188
22177
22189
\subsection{Type Normalization}
22178
22190
\LMLabel{typeNormalization}
0 commit comments