@@ -13797,7 +13797,7 @@ \subsection{Lookup}
13797
13797
13798
13798
{ % Scope for `lookup' definition.
13799
13799
13800
- \def\LookupDefinitionWithStart#1{
13800
+ \def\LookupDefinitionWithStart#1{%
13801
13801
\LMHash{}%
13802
13802
The result of a
13803
13803
{\em {#1} lookup for $m$ in $o$ with respect to $L$ starting in class $C$}
@@ -14120,7 +14120,7 @@ \subsection{Member Invocations}
14120
14120
expression $r$ is an expression of
14121
14121
one of the forms shown in Fig.~\ref{fig:memberInvocations}.
14122
14122
Each member invocation has a
14123
- \IndexCustom{corresponding member name}{
14123
+ \IndexCustom{corresponding member name}{%
14124
14124
member invocation!corresponding member name}
14125
14125
as shown in the figure.
14126
14126
@@ -15820,7 +15820,7 @@ \subsection{Null Shorting}
15820
15820
\IndexCustom{\metaCode{SHORT}}{null shorting!\metaCode{SHORT}}
15821
15821
is defined as follows:
15822
15822
15823
- {
15823
+ {%
15824
15824
\def\Base#1{\textcolor{normativeColor}{#1}}
15825
15825
\def\Meta#1{\textcolor{metaColor}{#1}}
15826
15826
\begin{metaLevelCode}
@@ -22244,29 +22244,27 @@ \subsection{Subtypes}
22244
22244
\newcommand{\SrnRightTop}{2}
22245
22245
\newcommand{\SrnLeftTop}{3}
22246
22246
\newcommand{\SrnBottom}{4}
22247
- \newcommand{\SrnRightObjectOne}{5.1}
22248
- \newcommand{\SrnRightObjectTwo}{5.2}
22249
- \newcommand{\SrnRightObjectThree}{5.3}
22250
- \newcommand{\SrnRightObjectFour}{5.4}
22251
- \newcommand{\SrnNullOne}{6.1}
22252
- \newcommand{\SrnNullTwo}{6.2}
22253
- \newcommand{\SrnLeftFutureOr}{7}
22254
- \newcommand{\SrnLeftNullable}{7b}
22255
- \newcommand{\SrnTypeVariableReflexivityA}{8}
22256
- \newcommand{\SrnRightPromotedVariable}{9}
22257
- \newcommand{\SrnRightFutureOrA}{10}
22258
- \newcommand{\SrnRightFutureOrB}{11}
22259
- \newcommand{\SrnRightNullableOne}{11b.1}
22260
- \newcommand{\SrnRightNullableTwo}{11b.2}
22261
- \newcommand{\SrnRightNullableThree}{11b.3}
22262
- \newcommand{\SrnRightNullableFour}{11b.4}
22263
- \newcommand{\SrnLeftPromotedVariable}{12}
22264
- \newcommand{\SrnLeftVariableBound}{13}
22265
- \newcommand{\SrnRightFunction}{14}
22266
- \newcommand{\SrnPositionalFunctionType}{15}
22267
- \newcommand{\SrnNamedFunctionType}{16}
22268
- \newcommand{\SrnCovariance}{17}
22269
- \newcommand{\SrnSuperinterface}{18}
22247
+ %\newcommand{\SrnRightObjectOne}{}
22248
+ %\newcommand{\SrnRightObjectTwo}{}
22249
+ %\newcommand{\SrnRightObjectThree}{}
22250
+ \newcommand{\SrnRightObjectFour}{5}
22251
+ \newcommand{\SrnNullOne}{6}
22252
+ \newcommand{\SrnNullTwo}{7}
22253
+ \newcommand{\SrnLeftFutureOr}{8}
22254
+ \newcommand{\SrnLeftNullable}{9}
22255
+ \newcommand{\SrnTypeVariableReflexivityA}{10}
22256
+ \newcommand{\SrnRightPromotedVariable}{11}
22257
+ \newcommand{\SrnRightFutureOrA}{12}
22258
+ \newcommand{\SrnRightFutureOrB}{13}
22259
+ \newcommand{\SrnRightNullableOne}{14}
22260
+ \newcommand{\SrnRightNullableTwo}{15}
22261
+ \newcommand{\SrnLeftPromotedVariable}{16}
22262
+ \newcommand{\SrnLeftVariableBound}{17}
22263
+ \newcommand{\SrnRightFunction}{18}
22264
+ \newcommand{\SrnPositionalFunctionType}{19}
22265
+ \newcommand{\SrnNamedFunctionType}{20}
22266
+ \newcommand{\SrnCovariance}{21}
22267
+ \newcommand{\SrnSuperinterface}{22}
22270
22268
22271
22269
\begin{figure}[p]
22272
22270
\def\VSP{\vspace{4mm}}
@@ -22279,55 +22277,95 @@ \subsection{Subtypes}
22279
22277
\centerline{\inference[#1]{#3}{\SubtypeStd{#4}{#5}}}\VSP}
22280
22278
\def\RuleRawRaw#1#2#3#4{\centerline{\inference[#1]{#3}{#4}}\VSP}
22281
22279
%
22280
+ % ----------------------------------------------------------------------
22281
+ % Omitted rules stated here, with justification for
22282
+ % the omission.
22283
+ % ------------------------------------------------ Right Object 1
22284
+ % Not needed unless algorithmic: Instance of
22285
+ % \SrnLeftVariableBound.
22286
+ % \RuleRaw{\SrnRightObjectOne}{Right Object 1}{%
22287
+ % \code{$X$\,\EXTENDS\,$B$} & \SubtypeStd{B}{\code{Object}}%
22288
+ % }{X}{\code{Object}}
22289
+ % ------------------------------------------------ Right Object 2
22290
+ % Not needed unless algorithmic: Instance of
22291
+ % \SrnLeftPromotedVariable.
22292
+ % \RuleRaw{\SrnRightObjectTwo}{}{%
22293
+ % \SubtypeStd{S}{\code{Object}}}{\code{$X$\,\&\,$S$}}{\code{Object}}
22294
+ % ------------------------------------------------ Right Object 3
22295
+ % Not needed unless algorithmic: Derivable from
22296
+ % \SrnLeftFutureOr{} and \SrnRightObjectFour{} (to get
22297
+ % Future<S> <: Object).
22298
+ % \RuleRaw{\SrnRightObjectThree}{}{%
22299
+ % \SubtypeStd{S}{\code{Object}}}{\code{FutureOr<$S$>}}{\code{Object}}
22300
+ % ----------------------------------------------------------------------
22282
22301
\begin{minipage}[c]{0.49\textwidth}
22283
- \Axiom{\SrnReflexivity}{Reflexivity}{T}{T}
22284
- \Axiom{\SrnBottom}{Left Bottom}{\code{Never}}{T}
22285
- \RuleRaw{\SrnRightObjectTwo}{Right Object 2}{%
22286
- \SubtypeStd{S}{\code{Object}}}{\code{$X$\,\&\,$S$}}{\code{Object}}
22287
- \RuleRaw{\SrnRightObjectThree}{Right Object 3}{%
22288
- \SubtypeStd{S}{\code{Object}}}{\code{FutureOr<$S$>}}{\code{Object}}
22289
- \Axiom{\SrnNullOne}{Left Null One}{\code{Null}}{\code{$T$?}}
22302
+ % ------------------------------------------------ Reflexivity
22303
+ \Axiom{\SrnReflexivity}{}{T}{T}
22304
+ \ExtraVSP
22305
+ % ------------------------------------------------ Left Top
22306
+ % Non-algorithmic justification for this rule: Needed
22307
+ % to prove dynamic/void <: FutureOr<Object>?.
22308
+ \RuleRaw{\SrnLeftTop}{}{%
22309
+ S \in \{\DYNAMIC, \VOID\}\\
22310
+ \SubtypeStd{\code{Object?}}{T}}{S}{T}
22311
+ % ------------------------------------------------ Left Bottom
22312
+ \Axiom{\SrnBottom}{}{\code{Never}}{T}
22313
+ % ------------------------------------------------ Left Null 1
22314
+ \Axiom{\SrnNullOne}{}{\code{Null}}{\code{$T$?}}
22290
22315
\end{minipage}
22291
22316
\begin{minipage}[c]{0.49\textwidth}
22292
- \RuleRaw{\SrnRightTop}{Right Top}{%
22317
+ % ------------------------------------------------ Right Top
22318
+ \RuleRaw{\SrnRightTop}{}{%
22293
22319
T \in \{\code{Object?}, \DYNAMIC, \VOID\}}{S}{T}
22294
- \RuleRaw{\SrnLeftTop}{Left Top}{%
22295
- S \in \{\DYNAMIC, \VOID\} & \SubtypeStd{\code{Object?}}{T}}{S}{T}
22296
- \RuleRaw{\SrnRightObjectOne}{Right Object 1}{%
22297
- \code{$X$\,\EXTENDS\,$B$} & \SubtypeStd{B}{\code{Object}}%
22298
- }{X}{\code{Object}}
22299
- \RuleRaw{\SrnRightObjectFour}{Right Object 4}{%
22320
+ % ------------------------------------------------ Right Object 4
22321
+ \RuleRaw{\SrnRightObjectFour}{}{%
22300
22322
$S$\,\not\in \{\code{Null}, \DYNAMIC, \VOID\}\\
22301
- \mbox{$S$ is not of the form \code{$U$?}, $X$, %
22302
- \code{$X$\,\&\,$U$}, \code{FutureOr<$U$>}}}{S}{\code{Object}}
22303
- \Rule{\SrnNullTwo}{Left Null Two}{\code{Null}}{T}{%
22323
+ \mbox{$S$ is not of the form \code{$U$?}, $X$,}\\
22324
+ \mbox{\code{$X$\,\&\,$U$}, %
22325
+ or \code{FutureOr<$U$>}}}{S}{\code{Object}}
22326
+ % ------------------------------------------------ Left Null 2
22327
+ \Rule{\SrnNullTwo}{}{\code{Null}}{T}{%
22304
22328
\code{Null}}{\code{FutureOr<$T$>}}
22305
22329
\end{minipage}
22306
22330
22307
22331
\begin{minipage}[c]{0.49\textwidth}
22308
- \RuleTwo{\SrnLeftFutureOr}{Left FutureOr}{S}{T}{%
22309
- \code{Future<$S$>}}{T}{\code{FutureOr<$S$>}}{T}
22310
- \RuleTwo{\SrnRightPromotedVariable}{Right Promoted Variable}{S}{X}{S}{T}{%
22332
+ % ------------------------------------------------ Left FutureOr
22333
+ \RuleTwo{\SrnLeftFutureOr}{}{%
22334
+ \code{Future<$S$>}}{T}{S}{T}{%
22335
+ \code{FutureOr<$S$>}}{T}
22336
+ % ------------------------------------------------ Right Promoted Variable
22337
+ \RuleTwo{\SrnRightPromotedVariable}{}{S}{X}{S}{T}{%
22311
22338
S}{X \& T}
22312
- \Rule{\SrnRightFutureOrB}{Right FutureOr B}{S}{T}{S}{\code{FutureOr<$T$>}}
22313
- \Rule{\SrnRightNullableTwo}{Right Nullable 2}{S}{\code{Null}}{S}{%
22339
+ % ------------------------------------------------ Right FutureOr B
22340
+ \Rule{\SrnRightFutureOrB}{}{S}{T}{S}{%
22341
+ \code{FutureOr<$T$>}}
22342
+ % ------------------------------------------------ Right Nullable 2
22343
+ \Rule{\SrnRightNullableTwo}{}{S}{\code{Null}}{S}{%
22314
22344
\code{$T$?}}
22315
- \Rule{\SrnLeftVariableBound}{Left Variable Bound}{\Gamma(X)}{T}{X}{T}
22345
+ % ------------------------------------------------ Left Variable Bound
22346
+ \Rule{\SrnLeftVariableBound}{}{\Gamma(X)}{T}{X}{T}
22316
22347
\end{minipage}
22317
22348
\begin{minipage}[c]{0.49\textwidth}
22318
- \RuleTwo{\SrnLeftNullable}{Left Nullable}{S}{T}{\code{Null}}{T}{
22349
+ % ------------------------------------------------ Left Nullable
22350
+ \RuleTwo{\SrnLeftNullable}{}{S}{T}{\code{Null}}{T}{%
22319
22351
\code{$S$?}}{T}
22320
- \Axiom{\SrnTypeVariableReflexivityA}{Left Promoted Variable A}{X \& S}{X}
22321
- \Rule{\SrnRightFutureOrA}{Right FutureOr A}{S}{\code{Future<$T$>}}{%
22322
- S}{\code{FutureOr<$T$>}}
22323
- \Rule{\SrnRightNullableOne}{Right Nullable 1}{S}{T}{S}{\code{$T$?}}
22324
- \Rule{\SrnLeftPromotedVariable}{Left Promoted Variable B}{S}{T}{X \& S}{T}
22325
- \RuleRaw{\SrnRightFunction}{Right Function}{T\mbox{ is a function type}}{%
22326
- T}{\FUNCTION}
22352
+ % ------------------------------------------------ Left Promoted Variable A
22353
+ \Axiom{\SrnTypeVariableReflexivityA}{}{X \& S}{X}
22354
+ % ------------------------------------------------ Right FutureOr A
22355
+ \Rule{\SrnRightFutureOrA}{}{S}{%
22356
+ \code{Future<$T$>}}{S}{\code{FutureOr<$T$>}}
22357
+ % ------------------------------------------------ Right Nullable 1
22358
+ \Rule{\SrnRightNullableOne}{}{S}{T}{S}{\code{$T$?}}
22359
+ % ------------------------------------------------ Left Promoted Variable B
22360
+ \Rule{\SrnLeftPromotedVariable}{}{S}{T}{X \& S}{T}
22361
+ % ------------------------------------------------ Right Function
22362
+ \RuleRaw{\SrnRightFunction}{}{%
22363
+ T\mbox{ is a function type}}{T}{\FUNCTION}
22327
22364
\end{minipage}
22328
22365
%
22329
22366
\ExtraVSP
22330
- \RuleRawRaw{\SrnPositionalFunctionType}{Positional Function Types}{%
22367
+ % ------------------------------------------------ Positional Function Type
22368
+ \RuleRawRaw{\SrnPositionalFunctionType}{}{%
22331
22369
\Gamma' = \Gamma\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
22332
22370
\Subtype{\Gamma'}{S_0}{T_0} \\
22333
22371
n_1 \leq n_2 &
@@ -22338,7 +22376,8 @@ \subsection{Subtypes}
22338
22376
\RawFunctionTypePositional{T_0}{X}{B}{s}{T}{n_2}{k_2}
22339
22377
\end{array}}
22340
22378
\ExtraVSP\ExtraVSP
22341
- \RuleRawRaw{\SrnNamedFunctionType}{Named Function Types}{%
22379
+ % ------------------------------------------------ Named Function Type
22380
+ \RuleRawRaw{\SrnNamedFunctionType}{}{%
22342
22381
\Gamma' = \Gamma\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
22343
22382
\Subtype{\Gamma'}{S_0}{T_0} &
22344
22383
\forall j \in 1 .. n\!:\;\Subtype{\Gamma'}{T_j}{S_j} \\
@@ -22351,14 +22390,15 @@ \subsection{Subtypes}
22351
22390
\end{array}}
22352
22391
%
22353
22392
\ExtraVSP
22354
- \RuleRaw{\SrnCovariance}{Covariance}{%
22355
- \code{\CLASS{} $C$<\TypeParametersNoBounds{X}{s}>\,\ldots\,\{\}} &
22356
- \forall j \in 1 .. s\!:\;\SubtypeStd{S_j}{T_j}}{%
22393
+ % ------------------------------------------------ Covariance
22394
+ \RuleRaw{\SrnCovariance}{}{%
22395
+ \mbox{$C$ is an interface type with $s$ type parameters} &
22396
+ \SubtypeStd{S_j}{T_j}\mbox{, for each $j \in 1..s$}}{%
22357
22397
\code{$C$<\List{S}{1}{s}>}}{\code{$C$<\List{T}{1}{s}>}}
22358
22398
\ExtraVSP
22359
- %% !!! Should include mixins (and other non-class interface types, if any).
22360
- \RuleRaw{\SrnSuperinterface}{Superinterface }{%
22361
- \code{\CLASS{} $C$<\TypeParametersNoBounds {X}{s}>\,\ldots\,\{\ }}\\
22399
+ % ------------------------------------------------ Superinterface
22400
+ \RuleRaw{\SrnSuperinterface}{}{%
22401
+ \mbox{ $C$ is an interface type with type parameters \List {X}{1}{s }}\\
22362
22402
\Superinterface{\code{$D$<\List{T}{1}{m}>}}{C} &
22363
22403
\SubtypeStd{[S_1/X_1,\ldots,S_s/X_s]\code{$D$<\List{T}{1}{m}>}}{T}}{%
22364
22404
\code{$C$<\List{S}{1}{s}>}\;}{\;T}
@@ -23724,7 +23764,7 @@ \subsubsection{Standard Upper Bounds and Standard Lower Bounds}
23724
23764
\DefEquals{\UpperBoundType{$T_1$}{$T_2$}}{T_2},
23725
23765
if \SubtypeNE{T_1}{T_2}.
23726
23766
23727
- \commentary{
23767
+ \commentary{%
23728
23768
In this and in the following cases, both types must be interface types.%
23729
23769
}
23730
23770
\item
@@ -23981,7 +24021,7 @@ \subsubsection{Standard Upper Bounds and Standard Lower Bounds}
23981
24021
\DefEquals{\LowerBoundType{$T_1$}{$T_2$}}{\code{Never}}, otherwise.
23982
24022
\end{itemize}
23983
24023
23984
- \rationale{
24024
+ \rationale{%
23985
24025
The rules defining \UpperBoundTypeName{} and \LowerBoundTypeName{}
23986
24026
are somewhat redundant in that they explicitly specify
23987
24027
a lot of pairs of symmetric cases.
0 commit comments