@@ -15244,7 +15244,11 @@ \subsubsection{Instance Method Closurization}
15244
15244
\LMHash{}%
15245
15245
For each parameter $p_j$, $j \in 1 .. n+k$, if $p_j$ is covariant
15246
15246
(\ref{covariantParameters})
15247
- then $T_j$ is \DYNAMIC. %% No user code will see this, avoid downcast in body.
15247
+ then $T_j$ is \code{Object?}.
15248
+ The corresponding actual argument in the body is replaced by
15249
+ \code{$p_j$\,\,\AS\,\,$T'_j$}
15250
+ where $T'_j$ is the type which would be $T_j$ if $p_j$ had not been covariant
15251
+ (\commentary{that is, it is computed as specified below}).
15248
15252
15249
15253
\commentary{%
15250
15254
This is concerned with the dynamic type of the function object obtained by
@@ -15257,12 +15261,15 @@ \subsubsection{Instance Method Closurization}
15257
15261
}
15258
15262
15259
15263
\LMHash{}%
15260
- Otherwise, if $T$ is a non-generic class then for $j \in 1 .. n+k$,
15264
+ Otherwise
15265
+ (\commentary{when $p_j$ is not covariant}),
15266
+ if $T$ is a non-generic class then for $j \in 1 .. n+k$,
15261
15267
$T_j$ is a type annotation that denotes the same type
15262
15268
(\ref{typeType})
15263
15269
as that which is denoted by the type annotation on
15264
15270
the corresponding parameter declaration in $D$.
15265
- If that parameter declaration has no type annotation then $T_j$ is \DYNAMIC.
15271
+ If that parameter declaration has no type annotation
15272
+ then $T_j$ is \code{Object?}.
15266
15273
15267
15274
\LMHash{}%
15268
15275
Otherwise $T$ is a generic instantiation of a generic class $G$.
@@ -15271,7 +15278,8 @@ \subsubsection{Instance Method Closurization}
15271
15278
Then $T_j$ is a type annotation that denotes
15272
15279
$[t''_1/X''_1, \ldots, t''_{s''}/X''_{s''}]S_j$,
15273
15280
where $S_j$ is the type annotation of the corresponding parameter in $D$.
15274
- If that parameter declaration has no type annotation then $T_j$ is \DYNAMIC.
15281
+ If that parameter declaration has no type annotation
15282
+ then $T_j$ is \code{Object?}.
15275
15283
15276
15284
\LMHash{}%
15277
15285
There is one way in which
@@ -15400,7 +15408,11 @@ \subsubsection{Super Closurization}
15400
15408
\LMHash{}%
15401
15409
For each parameter $p_j$, $j \in 1 .. n+k$, if $p_j$ is covariant
15402
15410
(\ref{covariantParameters})
15403
- then $T_j$ is \DYNAMIC.
15411
+ then $T_j$ is \code{Object?}.
15412
+ The corresponding actual argument in the body is replaced by
15413
+ \code{$p_j$\,\,\AS\,\,$T'_j$}
15414
+ where $T'_j$ is the type which would be $T_j$ if $p_j$ had not been covariant
15415
+ (\commentary{that is, it is computed as specified below}).
15404
15416
15405
15417
\commentary{%
15406
15418
This is concerned with the dynamic type of the function object obtained by
@@ -15413,12 +15425,15 @@ \subsubsection{Super Closurization}
15413
15425
}
15414
15426
15415
15427
\LMHash{}%
15416
- Otherwise, if $S$ is a non-generic class then for $j \in 1 .. n+k$,
15428
+ Otherwise
15429
+ (\commentary{when $p_j$ is not covariant}),
15430
+ if $S$ is a non-generic class then for $j \in 1 .. n+k$,
15417
15431
$T_j$ is a type annotation that denotes the same type
15418
15432
(\ref{typeType})
15419
15433
as that which is denoted by the type annotation on
15420
15434
the corresponding parameter declaration in $D$.
15421
- If that parameter declaration has no type annotation then $T_j$ is \DYNAMIC.
15435
+ If that parameter declaration has no type annotation
15436
+ then $T_j$ is \code{Object?}.
15422
15437
15423
15438
\LMHash{}%
15424
15439
Otherwise $S$ is a generic instantiation of a generic class $G$.
@@ -15427,7 +15442,8 @@ \subsubsection{Super Closurization}
15427
15442
Then $T_j$ is a type annotation that denotes
15428
15443
$[t''_1/X''_1, \ldots, t''_{s''}/X''_{s''}]S_j$,
15429
15444
where $S_j$ is the type annotation of the corresponding parameter in $D$.
15430
- If that parameter declaration has no type annotation then $T_j$ is \DYNAMIC.
15445
+ If that parameter declaration has no type annotation
15446
+ then $T_j$ is \code{Object?}.
15431
15447
15432
15448
\LMHash{}%
15433
15449
There is one way in which
0 commit comments