@@ -13695,7 +13695,7 @@ \subsection{Lookup}
1369513695
1369613696{ % Scope for `lookup' definition.
1369713697
13698- \def\LookupDefinitionWithStart#1{
13698+ \def\LookupDefinitionWithStart#1{%
1369913699\LMHash{}%
1370013700The result of a
1370113701{\em {#1} lookup for $m$ in $o$ with respect to $L$ starting in class $C$}
@@ -14018,7 +14018,7 @@ \subsection{Member Invocations}
1401814018expression $r$ is an expression of
1401914019one of the forms shown in Fig.~\ref{fig:memberInvocations}.
1402014020Each member invocation has a
14021- \IndexCustom{corresponding member name}{
14021+ \IndexCustom{corresponding member name}{%
1402214022 member invocation!corresponding member name}
1402314023as shown in the figure.
1402414024
@@ -15660,7 +15660,7 @@ \subsection{Null Shorting}
1566015660\IndexCustom{\metaCode{SHORT}}{null shorting!\metaCode{SHORT}}
1566115661is defined as follows:
1566215662
15663- {
15663+ {%
1566415664\def\Base#1{\textcolor{normativeColor}{#1}}
1566515665\def\Meta#1{\textcolor{metaColor}{#1}}
1566615666\begin{metaLevelCode}
@@ -21977,29 +21977,27 @@ \subsection{Subtypes}
2197721977\newcommand{\SrnRightTop}{2}
2197821978\newcommand{\SrnLeftTop}{3}
2197921979\newcommand{\SrnBottom}{4}
21980- \newcommand{\SrnRightObjectOne}{5.1}
21981- \newcommand{\SrnRightObjectTwo}{5.2}
21982- \newcommand{\SrnRightObjectThree}{5.3}
21983- \newcommand{\SrnRightObjectFour}{5.4}
21984- \newcommand{\SrnNullOne}{6.1}
21985- \newcommand{\SrnNullTwo}{6.2}
21986- \newcommand{\SrnLeftFutureOr}{7}
21987- \newcommand{\SrnLeftNullable}{7b}
21988- \newcommand{\SrnTypeVariableReflexivityA}{8}
21989- \newcommand{\SrnRightPromotedVariable}{9}
21990- \newcommand{\SrnRightFutureOrA}{10}
21991- \newcommand{\SrnRightFutureOrB}{11}
21992- \newcommand{\SrnRightNullableOne}{11b.1}
21993- \newcommand{\SrnRightNullableTwo}{11b.2}
21994- \newcommand{\SrnRightNullableThree}{11b.3}
21995- \newcommand{\SrnRightNullableFour}{11b.4}
21996- \newcommand{\SrnLeftPromotedVariable}{12}
21997- \newcommand{\SrnLeftVariableBound}{13}
21998- \newcommand{\SrnRightFunction}{14}
21999- \newcommand{\SrnPositionalFunctionType}{15}
22000- \newcommand{\SrnNamedFunctionType}{16}
22001- \newcommand{\SrnCovariance}{17}
22002- \newcommand{\SrnSuperinterface}{18}
21980+ %\newcommand{\SrnRightObjectOne}{}
21981+ %\newcommand{\SrnRightObjectTwo}{}
21982+ %\newcommand{\SrnRightObjectThree}{}
21983+ \newcommand{\SrnRightObjectFour}{5}
21984+ \newcommand{\SrnNullOne}{6}
21985+ \newcommand{\SrnNullTwo}{7}
21986+ \newcommand{\SrnLeftFutureOr}{8}
21987+ \newcommand{\SrnLeftNullable}{9}
21988+ \newcommand{\SrnTypeVariableReflexivityA}{10}
21989+ \newcommand{\SrnRightPromotedVariable}{11}
21990+ \newcommand{\SrnRightFutureOrA}{12}
21991+ \newcommand{\SrnRightFutureOrB}{13}
21992+ \newcommand{\SrnRightNullableOne}{14}
21993+ \newcommand{\SrnRightNullableTwo}{15}
21994+ \newcommand{\SrnLeftPromotedVariable}{16}
21995+ \newcommand{\SrnLeftVariableBound}{17}
21996+ \newcommand{\SrnRightFunction}{18}
21997+ \newcommand{\SrnPositionalFunctionType}{19}
21998+ \newcommand{\SrnNamedFunctionType}{20}
21999+ \newcommand{\SrnCovariance}{21}
22000+ \newcommand{\SrnSuperinterface}{22}
2200322001
2200422002\begin{figure}[p]
2200522003 \def\VSP{\vspace{4mm}}
@@ -22012,55 +22010,95 @@ \subsection{Subtypes}
2201222010 \centerline{\inference[#1]{#3}{\SubtypeStd{#4}{#5}}}\VSP}
2201322011 \def\RuleRawRaw#1#2#3#4{\centerline{\inference[#1]{#3}{#4}}\VSP}
2201422012 %
22013+ % ----------------------------------------------------------------------
22014+ % Omitted rules stated here, with justification for
22015+ % the omission.
22016+ % ------------------------------------------------ Right Object 1
22017+ % Not needed unless algorithmic: Instance of
22018+ % \SrnLeftVariableBound.
22019+ % \RuleRaw{\SrnRightObjectOne}{Right Object 1}{%
22020+ % \code{$X$\,\EXTENDS\,$B$} & \SubtypeStd{B}{\code{Object}}%
22021+ % }{X}{\code{Object}}
22022+ % ------------------------------------------------ Right Object 2
22023+ % Not needed unless algorithmic: Instance of
22024+ % \SrnLeftPromotedVariable.
22025+ % \RuleRaw{\SrnRightObjectTwo}{}{%
22026+ % \SubtypeStd{S}{\code{Object}}}{\code{$X$\,\&\,$S$}}{\code{Object}}
22027+ % ------------------------------------------------ Right Object 3
22028+ % Not needed unless algorithmic: Derivable from
22029+ % \SrnLeftFutureOr{} and \SrnRightObjectFour{} (to get
22030+ % Future<S> <: Object).
22031+ % \RuleRaw{\SrnRightObjectThree}{}{%
22032+ % \SubtypeStd{S}{\code{Object}}}{\code{FutureOr<$S$>}}{\code{Object}}
22033+ % ----------------------------------------------------------------------
2201522034 \begin{minipage}[c]{0.49\textwidth}
22016- \Axiom{\SrnReflexivity}{Reflexivity}{T}{T}
22017- \Axiom{\SrnBottom}{Left Bottom}{\code{Never}}{T}
22018- \RuleRaw{\SrnRightObjectTwo}{Right Object 2}{%
22019- \SubtypeStd{S}{\code{Object}}}{\code{$X$\,\&\,$S$}}{\code{Object}}
22020- \RuleRaw{\SrnRightObjectThree}{Right Object 3}{%
22021- \SubtypeStd{S}{\code{Object}}}{\code{FutureOr<$S$>}}{\code{Object}}
22022- \Axiom{\SrnNullOne}{Left Null One}{\code{Null}}{\code{$T$?}}
22035+ % ------------------------------------------------ Reflexivity
22036+ \Axiom{\SrnReflexivity}{}{T}{T}
22037+ \ExtraVSP
22038+ % ------------------------------------------------ Left Top
22039+ % Non-algorithmic justification for this rule: Needed
22040+ % to prove dynamic/void <: FutureOr<Object>?.
22041+ \RuleRaw{\SrnLeftTop}{}{%
22042+ S \in \{\DYNAMIC, \VOID\}\\
22043+ \SubtypeStd{\code{Object?}}{T}}{S}{T}
22044+ % ------------------------------------------------ Left Bottom
22045+ \Axiom{\SrnBottom}{}{\code{Never}}{T}
22046+ % ------------------------------------------------ Left Null 1
22047+ \Axiom{\SrnNullOne}{}{\code{Null}}{\code{$T$?}}
2202322048 \end{minipage}
2202422049 \begin{minipage}[c]{0.49\textwidth}
22025- \RuleRaw{\SrnRightTop}{Right Top}{%
22050+ % ------------------------------------------------ Right Top
22051+ \RuleRaw{\SrnRightTop}{}{%
2202622052 T \in \{\code{Object?}, \DYNAMIC, \VOID\}}{S}{T}
22027- \RuleRaw{\SrnLeftTop}{Left Top}{%
22028- S \in \{\DYNAMIC, \VOID\} & \SubtypeStd{\code{Object?}}{T}}{S}{T}
22029- \RuleRaw{\SrnRightObjectOne}{Right Object 1}{%
22030- \code{$X$\,\EXTENDS\,$B$} & \SubtypeStd{B}{\code{Object}}%
22031- }{X}{\code{Object}}
22032- \RuleRaw{\SrnRightObjectFour}{Right Object 4}{%
22053+ % ------------------------------------------------ Right Object 4
22054+ \RuleRaw{\SrnRightObjectFour}{}{%
2203322055 $S$\,\not\in \{\code{Null}, \DYNAMIC, \VOID\}\\
22034- \mbox{$S$ is not of the form \code{$U$?}, $X$, %
22035- \code{$X$\,\&\,$U$}, \code{FutureOr<$U$>}}}{S}{\code{Object}}
22036- \Rule{\SrnNullTwo}{Left Null Two}{\code{Null}}{T}{%
22056+ \mbox{$S$ is not of the form \code{$U$?}, $X$,}\\
22057+ \mbox{\code{$X$\,\&\,$U$}, %
22058+ or \code{FutureOr<$U$>}}}{S}{\code{Object}}
22059+ % ------------------------------------------------ Left Null 2
22060+ \Rule{\SrnNullTwo}{}{\code{Null}}{T}{%
2203722061 \code{Null}}{\code{FutureOr<$T$>}}
2203822062 \end{minipage}
2203922063
2204022064 \begin{minipage}[c]{0.49\textwidth}
22041- \RuleTwo{\SrnLeftFutureOr}{Left FutureOr}{S}{T}{%
22042- \code{Future<$S$>}}{T}{\code{FutureOr<$S$>}}{T}
22043- \RuleTwo{\SrnRightPromotedVariable}{Right Promoted Variable}{S}{X}{S}{T}{%
22065+ % ------------------------------------------------ Left FutureOr
22066+ \RuleTwo{\SrnLeftFutureOr}{}{%
22067+ \code{Future<$S$>}}{T}{S}{T}{%
22068+ \code{FutureOr<$S$>}}{T}
22069+ % ------------------------------------------------ Right Promoted Variable
22070+ \RuleTwo{\SrnRightPromotedVariable}{}{S}{X}{S}{T}{%
2204422071 S}{X \& T}
22045- \Rule{\SrnRightFutureOrB}{Right FutureOr B}{S}{T}{S}{\code{FutureOr<$T$>}}
22046- \Rule{\SrnRightNullableTwo}{Right Nullable 2}{S}{\code{Null}}{S}{%
22072+ % ------------------------------------------------ Right FutureOr B
22073+ \Rule{\SrnRightFutureOrB}{}{S}{T}{S}{%
22074+ \code{FutureOr<$T$>}}
22075+ % ------------------------------------------------ Right Nullable 2
22076+ \Rule{\SrnRightNullableTwo}{}{S}{\code{Null}}{S}{%
2204722077 \code{$T$?}}
22048- \Rule{\SrnLeftVariableBound}{Left Variable Bound}{\Gamma(X)}{T}{X}{T}
22078+ % ------------------------------------------------ Left Variable Bound
22079+ \Rule{\SrnLeftVariableBound}{}{\Gamma(X)}{T}{X}{T}
2204922080 \end{minipage}
2205022081 \begin{minipage}[c]{0.49\textwidth}
22051- \RuleTwo{\SrnLeftNullable}{Left Nullable}{S}{T}{\code{Null}}{T}{
22082+ % ------------------------------------------------ Left Nullable
22083+ \RuleTwo{\SrnLeftNullable}{}{S}{T}{\code{Null}}{T}{%
2205222084 \code{$S$?}}{T}
22053- \Axiom{\SrnTypeVariableReflexivityA}{Left Promoted Variable A}{X \& S}{X}
22054- \Rule{\SrnRightFutureOrA}{Right FutureOr A}{S}{\code{Future<$T$>}}{%
22055- S}{\code{FutureOr<$T$>}}
22056- \Rule{\SrnRightNullableOne}{Right Nullable 1}{S}{T}{S}{\code{$T$?}}
22057- \Rule{\SrnLeftPromotedVariable}{Left Promoted Variable B}{S}{T}{X \& S}{T}
22058- \RuleRaw{\SrnRightFunction}{Right Function}{T\mbox{ is a function type}}{%
22059- T}{\FUNCTION}
22085+ % ------------------------------------------------ Left Promoted Variable A
22086+ \Axiom{\SrnTypeVariableReflexivityA}{}{X \& S}{X}
22087+ % ------------------------------------------------ Right FutureOr A
22088+ \Rule{\SrnRightFutureOrA}{}{S}{%
22089+ \code{Future<$T$>}}{S}{\code{FutureOr<$T$>}}
22090+ % ------------------------------------------------ Right Nullable 1
22091+ \Rule{\SrnRightNullableOne}{}{S}{T}{S}{\code{$T$?}}
22092+ % ------------------------------------------------ Left Promoted Variable B
22093+ \Rule{\SrnLeftPromotedVariable}{}{S}{T}{X \& S}{T}
22094+ % ------------------------------------------------ Right Function
22095+ \RuleRaw{\SrnRightFunction}{}{%
22096+ T\mbox{ is a function type}}{T}{\FUNCTION}
2206022097 \end{minipage}
2206122098 %
2206222099 \ExtraVSP
22063- \RuleRawRaw{\SrnPositionalFunctionType}{Positional Function Types}{%
22100+ % ------------------------------------------------ Positional Function Type
22101+ \RuleRawRaw{\SrnPositionalFunctionType}{}{%
2206422102 \Gamma' = \Gamma\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
2206522103 \Subtype{\Gamma'}{S_0}{T_0} \\
2206622104 n_1 \leq n_2 &
@@ -22071,7 +22109,8 @@ \subsection{Subtypes}
2207122109 \RawFunctionTypePositional{T_0}{X}{B}{s}{T}{n_2}{k_2}
2207222110 \end{array}}
2207322111 \ExtraVSP\ExtraVSP
22074- \RuleRawRaw{\SrnNamedFunctionType}{Named Function Types}{%
22112+ % ------------------------------------------------ Named Function Type
22113+ \RuleRawRaw{\SrnNamedFunctionType}{}{%
2207522114 \Gamma' = \Gamma\uplus\{X_i\mapsto{}B_i\,|\,1 \leq i \leq s\} &
2207622115 \Subtype{\Gamma'}{S_0}{T_0} &
2207722116 \forall j \in 1 .. n\!:\;\Subtype{\Gamma'}{T_j}{S_j} \\
@@ -22084,14 +22123,15 @@ \subsection{Subtypes}
2208422123 \end{array}}
2208522124 %
2208622125 \ExtraVSP
22087- \RuleRaw{\SrnCovariance}{Covariance}{%
22088- \code{\CLASS{} $C$<\TypeParametersNoBounds{X}{s}>\,\ldots\,\{\}} &
22089- \forall j \in 1 .. s\!:\;\SubtypeStd{S_j}{T_j}}{%
22126+ % ------------------------------------------------ Covariance
22127+ \RuleRaw{\SrnCovariance}{}{%
22128+ \mbox{$C$ is an interface type with $s$ type parameters} &
22129+ \SubtypeStd{S_j}{T_j}\mbox{, for each $j \in 1..s$}}{%
2209022130 \code{$C$<\List{S}{1}{s}>}}{\code{$C$<\List{T}{1}{s}>}}
2209122131 \ExtraVSP
22092- %% !!! Should include mixins (and other non-class interface types, if any).
22093- \RuleRaw{\SrnSuperinterface}{Superinterface }{%
22094- \code{\CLASS{} $C$<\TypeParametersNoBounds {X}{s}>\,\ldots\,\{\ }}\\
22132+ % ------------------------------------------------ Superinterface
22133+ \RuleRaw{\SrnSuperinterface}{}{%
22134+ \mbox{ $C$ is an interface type with type parameters \List {X}{1}{s }}\\
2209522135 \Superinterface{\code{$D$<\List{T}{1}{m}>}}{C} &
2209622136 \SubtypeStd{[S_1/X_1,\ldots,S_s/X_s]\code{$D$<\List{T}{1}{m}>}}{T}}{%
2209722137 \code{$C$<\List{S}{1}{s}>}\;}{\;T}
@@ -23457,7 +23497,7 @@ \subsubsection{Standard Upper Bounds and Standard Lower Bounds}
2345723497 \DefEquals{\UpperBoundType{$T_1$}{$T_2$}}{T_2},
2345823498 if \SubtypeNE{T_1}{T_2}.
2345923499
23460- \commentary{
23500+ \commentary{%
2346123501 In this and in the following cases, both types must be interface types.%
2346223502 }
2346323503\item
@@ -23714,7 +23754,7 @@ \subsubsection{Standard Upper Bounds and Standard Lower Bounds}
2371423754 \DefEquals{\LowerBoundType{$T_1$}{$T_2$}}{\code{Never}}, otherwise.
2371523755\end{itemize}
2371623756
23717- \rationale{
23757+ \rationale{%
2371823758The rules defining \UpperBoundTypeName{} and \LowerBoundTypeName{}
2371923759are somewhat redundant in that they explicitly specify
2372023760a lot of pairs of symmetric cases.
0 commit comments