@@ -22155,36 +22155,6 @@ \subsubsection{Being a Subtype}
22155
22155
each of the premises of $R$,
22156
22156
continuing until a rule with no premises is reached.
22157
22157
22158
- \commentary{%
22159
- For rule \SrnNull, note that the \code{Null} type
22160
- is a subtype of all non-$\bot$ types,
22161
- even though it doesn't actually extend or implement those types.
22162
- The other types are effectively treated as if they were nullable,
22163
- which makes the null object (\ref{null}) assignable to them.%
22164
- }
22165
-
22166
- \LMHash{}%
22167
- The first premise in the
22168
- rules~\SrnLeftTypeAlias{} and~\SrnRightTypeAlias{}
22169
- is a type alias declaration.
22170
- This premise is satisfied in each of the following situations:
22171
-
22172
- \begin{itemize}
22173
- \item A non-generic type alias named $F$ is declared.
22174
- In this case $s$ is zero,
22175
- no assumptions are made about the existence
22176
- of any formal type parameters,
22177
- and actual type argument lists are omitted everywhere in the rule.
22178
- \item We may choose $s$ and \List{X}{1}{s} such that the following holds:
22179
- A generic type alias named $F$ is declared,
22180
- with formal type parameters \List{X}{1}{s}.
22181
- \commentary{%
22182
- Each formal type parameter $X_j$ may have a bound,
22183
- but the bounds are never used in this context,
22184
- so we do not introduce metavariables for them.%
22185
- }
22186
- \end{itemize}
22187
-
22188
22158
\LMHash{}%
22189
22159
Rule~\SrnRightFunction{} has as a premise that `$T$ is a function type'.
22190
22160
This means that $T$ is a type of one of the forms introduced in
@@ -22222,14 +22192,14 @@ \subsubsection{Being a Subtype}
22222
22192
}
22223
22193
22224
22194
\commentary{%
22225
- The last premise of rule~\SrnSuperinterface {}
22195
+ The last premise of rule~\SrnNominal {}
22226
22196
substitutes the actual type arguments \List{S}{1}{s} for the
22227
22197
formal type parameters \List{X}{1}{s},
22228
22198
because \List{T}{1}{m} may contain those formal type parameters.%
22229
22199
}
22230
22200
22231
22201
\commentary{%
22232
- The rules~\SrnCovariance{} and~\SrnSuperinterface {}
22202
+ The rules~\SrnCovariance{} and~\SrnNominal {}
22233
22203
are applicable to interfaces,
22234
22204
but they can be used with classes as well,
22235
22205
because a non-generic class $C$ which is used as a type
0 commit comments