@@ -5440,7 +5440,12 @@ \subsection{Combined Member Signatures}
5440
5440
5441
5441
\LMHash{}%
5442
5442
Let \mall{} be the result of applying \TopMergeTypeName{} to
5443
- the elements in \Mall.
5443
+ \NormalizedTypeOfName{} of the elements in \Mall.
5444
+ \commentary{%
5445
+ Note that these types are mutual subtypes,
5446
+ and hence the normalized forms are structurally identical,
5447
+ modulo different choices of top type in some locations.%
5448
+ }
5444
5449
The combined member signature is then $m'$,
5445
5450
which is obtained from \mall{} by adding the modifier \COVARIANT{}
5446
5451
to each parameter $p$ (if it is not already present)
@@ -22289,6 +22294,8 @@ \subsection{Functions Dealing with Extreme Types}
22289
22294
\LMHash{}%
22290
22295
The functions are syntactic in nature such that termination is obvious.
22291
22296
In particular, they do not rely on subtyping.
22297
+ In each of these function definitions,
22298
+ the first applicable case must be used.
22292
22299
22293
22300
\LMHash{}%
22294
22301
The \Index{\TopMergeTypeName} of two types computes
@@ -22303,10 +22310,10 @@ \subsection{Functions Dealing with Extreme Types}
22303
22310
\item \DefEquals{\TopMergeType{\VOID}{\VOID}}{\code{\VOID}}.
22304
22311
\item \DefEquals{\TopMergeType{Object?}{\VOID}}{\code{Object?}}, and\\
22305
22312
\DefEquals{\TopMergeType{\VOID}{Object?}}{\code{Object?}}.
22306
- \item \DefEquals{\TopMergeType{\DYNAMIC}{\VOID}}{\code{Object?}}, and\\
22307
- \DefEquals{\TopMergeType{\VOID}{\DYNAMIC}}{\code{Object?}}
22308
22313
\item \DefEquals{\TopMergeType{Object?}{\DYNAMIC}}{\code{Object?}}, and\\
22309
22314
\DefEquals{\TopMergeType{\DYNAMIC}{Object?}}{\code{Object?}}.
22315
+ \item \DefEquals{\TopMergeType{\DYNAMIC}{\VOID}}{\code{Object?}}, and\\
22316
+ \DefEquals{\TopMergeType{\VOID}{\DYNAMIC}}{\code{Object?}}
22310
22317
\item \DefEquals{\TopMergeType{$T$?}{$S$?}}{\code{\TopMergeType{$T$}{$S$}?}}.
22311
22318
\item For all other types, the function is applied recursively.
22312
22319
@@ -22323,6 +22330,9 @@ \subsection{Functions Dealing with Extreme Types}
22323
22330
Note that \TopMergeTypeName{} is not defined for
22324
22331
types which are structurally different,
22325
22332
apart from being or containing different top types.
22333
+ When \TopMergeTypeName{} is used in this specification,
22334
+ each case where \TopMergeTypeName{} is undefined
22335
+ is handled explicitly.%
22326
22336
}
22327
22337
22328
22338
\rationale{%
@@ -22333,7 +22343,10 @@ \subsection{Functions Dealing with Extreme Types}
22333
22343
}
22334
22344
22335
22345
\commentary{%
22336
- For instance, if a class $C$ inherits a method $m$ that accepts
22346
+ For instance, \TopMergeTypeName{} is used during the computation of
22347
+ the interface of a class member which is declared
22348
+ in multiple superinterfaces.
22349
+ If a class $C$ inherits a method $m$ that accepts
22337
22350
an argument of type \code{List<\DYNAMIC>} from one superinterface,
22338
22351
and another method $m$ that accepts
22339
22352
an argument of type \code{List<\VOID>}
@@ -22347,7 +22360,8 @@ \subsection{Functions Dealing with Extreme Types}
22347
22360
\TopMergeTypeName{} of more than two types is defined by taking
22348
22361
\TopMergeTypeName{} of the first two,
22349
22362
and then recursively taking \TopMergeTypeName{} of the rest.
22350
-
22363
+ \commentary{The ordering of the arguments makes no difference.}
22364
+
22351
22365
\LMHash{}%
22352
22366
The \Index{\IsTopTypeName} predicate is true for any type which is in
22353
22367
the equivalence class of top types.
@@ -22362,7 +22376,7 @@ \subsection{Functions Dealing with Extreme Types}
22362
22376
\item \DefEquals{\IsTopType{$T$}}{\metavar{false}}, otherwise.
22363
22377
\end{itemize}
22364
22378
22365
- \LMHash{}%
22379
+ \noindent
22366
22380
The \Index{\IsObjectTypeName} predicate is true if{}f
22367
22381
the argument is a subtype and a supertype of \code{Object}.
22368
22382
@@ -22372,7 +22386,7 @@ \subsection{Functions Dealing with Extreme Types}
22372
22386
\item \DefEquals{\IsObjectType{$T$}}{\metavar{false}}, otherwise.
22373
22387
\end{itemize}
22374
22388
22375
- \LMHash{}%
22389
+ \noindent
22376
22390
The \Index{\IsBottomTypeName} predicate is true if{}f
22377
22391
the argument is a subtype of \code{Never}.
22378
22392
@@ -22383,7 +22397,7 @@ \subsection{Functions Dealing with Extreme Types}
22383
22397
\item \DefEquals{\IsBottomType{$T$}}{\metavar{false}}, otherwise.
22384
22398
\end{itemize}
22385
22399
22386
- \LMHash{}%
22400
+ \noindent
22387
22401
The \Index{\IsNullTypeName} predicate is true if{}f
22388
22402
the argument is a subtype and a supertype of \code{Null}.
22389
22403
@@ -22393,7 +22407,7 @@ \subsection{Functions Dealing with Extreme Types}
22393
22407
\item \DefEquals{\IsNullType{$T$}}{\metavar{false}}, otherwise.
22394
22408
\end{itemize}
22395
22409
22396
- \LMHash{}%
22410
+ \noindent
22397
22411
The \Index{\IsMoreTopTypeName} predicate defines a total order on
22398
22412
top and \code{Object} types.
22399
22413
@@ -22411,7 +22425,7 @@ \subsection{Functions Dealing with Extreme Types}
22411
22425
\IsMoreTopType{$T$}{$S$}}.
22412
22426
\end{itemize}
22413
22427
22414
- \LMHash{}%
22428
+ \noindent
22415
22429
The \Index{\IsMoreBottomTypeName} predicate defines an almost total order on
22416
22430
bottom and \code{Null} types.
22417
22431
\commentary{%
@@ -22436,8 +22450,6 @@ \subsection{Functions Dealing with Extreme Types}
22436
22450
\IsMoreBottomType{$T$}{$S$}}.
22437
22451
\end{itemize}
22438
22452
22439
- !!!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.
22440
-
22441
22453
22442
22454
\subsection{Type Normalization}
22443
22455
\LMLabel{typeNormalization}
0 commit comments