@@ -5432,7 +5432,12 @@ \subsection{Combined Member Signatures}
5432
5432
5433
5433
\LMHash{}%
5434
5434
Let \mall{} be the result of applying \TopMergeTypeName{} to
5435
- the elements in \Mall.
5435
+ \NormalizedTypeOfName{} of the elements in \Mall.
5436
+ \commentary{%
5437
+ Note that these types are mutual subtypes,
5438
+ and hence the normalized forms are structurally identical,
5439
+ modulo different choices of top type in some locations.%
5440
+ }
5436
5441
The combined member signature is then $m'$,
5437
5442
which is obtained from \mall{} by adding the modifier \COVARIANT{}
5438
5443
to each parameter $p$ (if it is not already present)
@@ -22152,6 +22157,8 @@ \subsection{Functions Dealing with Extreme Types}
22152
22157
\LMHash{}%
22153
22158
The functions are syntactic in nature such that termination is obvious.
22154
22159
In particular, they do not rely on subtyping.
22160
+ In each of these function definitions,
22161
+ the first applicable case must be used.
22155
22162
22156
22163
\LMHash{}%
22157
22164
The \Index{\TopMergeTypeName} of two types computes
@@ -22166,10 +22173,10 @@ \subsection{Functions Dealing with Extreme Types}
22166
22173
\item \DefEquals{\TopMergeType{\VOID}{\VOID}}{\code{\VOID}}.
22167
22174
\item \DefEquals{\TopMergeType{Object?}{\VOID}}{\code{Object?}}, and\\
22168
22175
\DefEquals{\TopMergeType{\VOID}{Object?}}{\code{Object?}}.
22169
- \item \DefEquals{\TopMergeType{\DYNAMIC}{\VOID}}{\code{Object?}}, and\\
22170
- \DefEquals{\TopMergeType{\VOID}{\DYNAMIC}}{\code{Object?}}
22171
22176
\item \DefEquals{\TopMergeType{Object?}{\DYNAMIC}}{\code{Object?}}, and\\
22172
22177
\DefEquals{\TopMergeType{\DYNAMIC}{Object?}}{\code{Object?}}.
22178
+ \item \DefEquals{\TopMergeType{\DYNAMIC}{\VOID}}{\code{Object?}}, and\\
22179
+ \DefEquals{\TopMergeType{\VOID}{\DYNAMIC}}{\code{Object?}}
22173
22180
\item \DefEquals{\TopMergeType{$T$?}{$S$?}}{\code{\TopMergeType{$T$}{$S$}?}}.
22174
22181
\item For all other types, the function is applied recursively.
22175
22182
@@ -22186,6 +22193,9 @@ \subsection{Functions Dealing with Extreme Types}
22186
22193
Note that \TopMergeTypeName{} is not defined for
22187
22194
types which are structurally different,
22188
22195
apart from being or containing different top types.
22196
+ When \TopMergeTypeName{} is used in this specification,
22197
+ each case where \TopMergeTypeName{} is undefined
22198
+ is handled explicitly.%
22189
22199
}
22190
22200
22191
22201
\rationale{%
@@ -22196,7 +22206,10 @@ \subsection{Functions Dealing with Extreme Types}
22196
22206
}
22197
22207
22198
22208
\commentary{%
22199
- For instance, if a class $C$ inherits a method $m$ that accepts
22209
+ For instance, \TopMergeTypeName{} is used during the computation of
22210
+ the interface of a class member which is declared
22211
+ in multiple superinterfaces.
22212
+ If a class $C$ inherits a method $m$ that accepts
22200
22213
an argument of type \code{List<\DYNAMIC>} from one superinterface,
22201
22214
and another method $m$ that accepts
22202
22215
an argument of type \code{List<\VOID>}
@@ -22210,7 +22223,8 @@ \subsection{Functions Dealing with Extreme Types}
22210
22223
\TopMergeTypeName{} of more than two types is defined by taking
22211
22224
\TopMergeTypeName{} of the first two,
22212
22225
and then recursively taking \TopMergeTypeName{} of the rest.
22213
-
22226
+ \commentary{The ordering of the arguments makes no difference.}
22227
+
22214
22228
\LMHash{}%
22215
22229
The \Index{\IsTopTypeName} predicate is true for any type which is in
22216
22230
the equivalence class of top types.
@@ -22225,7 +22239,7 @@ \subsection{Functions Dealing with Extreme Types}
22225
22239
\item \DefEquals{\IsTopType{$T$}}{\metavar{false}}, otherwise.
22226
22240
\end{itemize}
22227
22241
22228
- \LMHash{}%
22242
+ \noindent
22229
22243
The \Index{\IsObjectTypeName} predicate is true if{}f
22230
22244
the argument is a subtype and a supertype of \code{Object}.
22231
22245
@@ -22235,7 +22249,7 @@ \subsection{Functions Dealing with Extreme Types}
22235
22249
\item \DefEquals{\IsObjectType{$T$}}{\metavar{false}}, otherwise.
22236
22250
\end{itemize}
22237
22251
22238
- \LMHash{}%
22252
+ \noindent
22239
22253
The \Index{\IsBottomTypeName} predicate is true if{}f
22240
22254
the argument is a subtype of \code{Never}.
22241
22255
@@ -22246,7 +22260,7 @@ \subsection{Functions Dealing with Extreme Types}
22246
22260
\item \DefEquals{\IsBottomType{$T$}}{\metavar{false}}, otherwise.
22247
22261
\end{itemize}
22248
22262
22249
- \LMHash{}%
22263
+ \noindent
22250
22264
The \Index{\IsNullTypeName} predicate is true if{}f
22251
22265
the argument is a subtype and a supertype of \code{Null}.
22252
22266
@@ -22256,7 +22270,7 @@ \subsection{Functions Dealing with Extreme Types}
22256
22270
\item \DefEquals{\IsNullType{$T$}}{\metavar{false}}, otherwise.
22257
22271
\end{itemize}
22258
22272
22259
- \LMHash{}%
22273
+ \noindent
22260
22274
The \Index{\IsMoreTopTypeName} predicate defines a total order on
22261
22275
top and \code{Object} types.
22262
22276
@@ -22274,7 +22288,7 @@ \subsection{Functions Dealing with Extreme Types}
22274
22288
\IsMoreTopType{$T$}{$S$}}.
22275
22289
\end{itemize}
22276
22290
22277
- \LMHash{}%
22291
+ \noindent
22278
22292
The \Index{\IsMoreBottomTypeName} predicate defines an almost total order on
22279
22293
bottom and \code{Null} types.
22280
22294
\commentary{%
@@ -22299,8 +22313,6 @@ \subsection{Functions Dealing with Extreme Types}
22299
22313
\IsMoreBottomType{$T$}{$S$}}.
22300
22314
\end{itemize}
22301
22315
22302
- !!!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.
22303
-
22304
22316
22305
22317
\subsection{Type Normalization}
22306
22318
\LMLabel{typeNormalization}
0 commit comments