@@ -15406,7 +15406,11 @@ \subsubsection{Instance Method Closurization}
15406
15406
\LMHash{}%
15407
15407
For each parameter $p_j$, $j \in 1 .. n+k$, if $p_j$ is covariant
15408
15408
(\ref{covariantParameters})
15409
- then $T_j$ is \DYNAMIC. %% No user code will see this, avoid downcast in body.
15409
+ then $T_j$ is \code{Object?}.
15410
+ The corresponding actual argument in the body is replaced by
15411
+ \code{$p_j$\,\,\AS\,\,$T'_j$}
15412
+ where $T'_j$ is the type which would be $T_j$ if $p_j$ had not been covariant
15413
+ (\commentary{that is, it is computed as specified below}).
15410
15414
15411
15415
\commentary{%
15412
15416
This is concerned with the dynamic type of the function object obtained by
@@ -15419,12 +15423,15 @@ \subsubsection{Instance Method Closurization}
15419
15423
}
15420
15424
15421
15425
\LMHash{}%
15422
- Otherwise, if $T$ is a non-generic class then for $j \in 1 .. n+k$,
15426
+ Otherwise
15427
+ (\commentary{when $p_j$ is not covariant}),
15428
+ if $T$ is a non-generic class then for $j \in 1 .. n+k$,
15423
15429
$T_j$ is a type annotation that denotes the same type
15424
15430
(\ref{typeType})
15425
15431
as that which is denoted by the type annotation on
15426
15432
the corresponding parameter declaration in $D$.
15427
- If that parameter declaration has no type annotation then $T_j$ is \DYNAMIC.
15433
+ If that parameter declaration has no type annotation
15434
+ then $T_j$ is \code{Object?}.
15428
15435
15429
15436
\LMHash{}%
15430
15437
Otherwise $T$ is a generic instantiation of a generic class $G$.
@@ -15433,7 +15440,8 @@ \subsubsection{Instance Method Closurization}
15433
15440
Then $T_j$ is a type annotation that denotes
15434
15441
$[t''_1/X''_1, \ldots, t''_{s''}/X''_{s''}]S_j$,
15435
15442
where $S_j$ is the type annotation of the corresponding parameter in $D$.
15436
- If that parameter declaration has no type annotation then $T_j$ is \DYNAMIC.
15443
+ If that parameter declaration has no type annotation
15444
+ then $T_j$ is \code{Object?}.
15437
15445
15438
15446
\LMHash{}%
15439
15447
There is one way in which
@@ -15562,7 +15570,11 @@ \subsubsection{Super Closurization}
15562
15570
\LMHash{}%
15563
15571
For each parameter $p_j$, $j \in 1 .. n+k$, if $p_j$ is covariant
15564
15572
(\ref{covariantParameters})
15565
- then $T_j$ is \DYNAMIC.
15573
+ then $T_j$ is \code{Object?}.
15574
+ The corresponding actual argument in the body is replaced by
15575
+ \code{$p_j$\,\,\AS\,\,$T'_j$}
15576
+ where $T'_j$ is the type which would be $T_j$ if $p_j$ had not been covariant
15577
+ (\commentary{that is, it is computed as specified below}).
15566
15578
15567
15579
\commentary{%
15568
15580
This is concerned with the dynamic type of the function object obtained by
@@ -15575,12 +15587,15 @@ \subsubsection{Super Closurization}
15575
15587
}
15576
15588
15577
15589
\LMHash{}%
15578
- Otherwise, if $S$ is a non-generic class then for $j \in 1 .. n+k$,
15590
+ Otherwise
15591
+ (\commentary{when $p_j$ is not covariant}),
15592
+ if $S$ is a non-generic class then for $j \in 1 .. n+k$,
15579
15593
$T_j$ is a type annotation that denotes the same type
15580
15594
(\ref{typeType})
15581
15595
as that which is denoted by the type annotation on
15582
15596
the corresponding parameter declaration in $D$.
15583
- If that parameter declaration has no type annotation then $T_j$ is \DYNAMIC.
15597
+ If that parameter declaration has no type annotation
15598
+ then $T_j$ is \code{Object?}.
15584
15599
15585
15600
\LMHash{}%
15586
15601
Otherwise $S$ is a generic instantiation of a generic class $G$.
@@ -15589,7 +15604,8 @@ \subsubsection{Super Closurization}
15589
15604
Then $T_j$ is a type annotation that denotes
15590
15605
$[t''_1/X''_1, \ldots, t''_{s''}/X''_{s''}]S_j$,
15591
15606
where $S_j$ is the type annotation of the corresponding parameter in $D$.
15592
- If that parameter declaration has no type annotation then $T_j$ is \DYNAMIC.
15607
+ If that parameter declaration has no type annotation
15608
+ then $T_j$ is \code{Object?}.
15593
15609
15594
15610
\LMHash{}%
15595
15611
There is one way in which
0 commit comments