@@ -15425,7 +15425,11 @@ \subsubsection{Instance Method Closurization}
15425
15425
\LMHash{}%
15426
15426
For each parameter $p_j$, $j \in 1 .. n+k$, if $p_j$ is covariant
15427
15427
(\ref{covariantParameters})
15428
- then $T_j$ is \DYNAMIC. %% No user code will see this, avoid downcast in body.
15428
+ then $T_j$ is \code{Object?}.
15429
+ The corresponding actual argument in the body is replaced by
15430
+ \code{$p_j$\,\,\AS\,\,$T'_j$}
15431
+ where $T'_j$ is the type which would be $T_j$ if $p_j$ had not been covariant
15432
+ (\commentary{that is, it is computed as specified below}).
15429
15433
15430
15434
\commentary{%
15431
15435
This is concerned with the dynamic type of the function object obtained by
@@ -15438,12 +15442,15 @@ \subsubsection{Instance Method Closurization}
15438
15442
}
15439
15443
15440
15444
\LMHash{}%
15441
- Otherwise, if $T$ is a non-generic class then for $j \in 1 .. n+k$,
15445
+ Otherwise
15446
+ (\commentary{when $p_j$ is not covariant}),
15447
+ if $T$ is a non-generic class then for $j \in 1 .. n+k$,
15442
15448
$T_j$ is a type annotation that denotes the same type
15443
15449
(\ref{typeType})
15444
15450
as that which is denoted by the type annotation on
15445
15451
the corresponding parameter declaration in $D$.
15446
- If that parameter declaration has no type annotation then $T_j$ is \DYNAMIC.
15452
+ If that parameter declaration has no type annotation
15453
+ then $T_j$ is \code{Object?}.
15447
15454
15448
15455
\LMHash{}%
15449
15456
Otherwise $T$ is a generic instantiation of a generic class $G$.
@@ -15452,7 +15459,8 @@ \subsubsection{Instance Method Closurization}
15452
15459
Then $T_j$ is a type annotation that denotes
15453
15460
$[t''_1/X''_1, \ldots, t''_{s''}/X''_{s''}]S_j$,
15454
15461
where $S_j$ is the type annotation of the corresponding parameter in $D$.
15455
- If that parameter declaration has no type annotation then $T_j$ is \DYNAMIC.
15462
+ If that parameter declaration has no type annotation
15463
+ then $T_j$ is \code{Object?}.
15456
15464
15457
15465
\LMHash{}%
15458
15466
There is one way in which
@@ -15581,7 +15589,11 @@ \subsubsection{Super Closurization}
15581
15589
\LMHash{}%
15582
15590
For each parameter $p_j$, $j \in 1 .. n+k$, if $p_j$ is covariant
15583
15591
(\ref{covariantParameters})
15584
- then $T_j$ is \DYNAMIC.
15592
+ then $T_j$ is \code{Object?}.
15593
+ The corresponding actual argument in the body is replaced by
15594
+ \code{$p_j$\,\,\AS\,\,$T'_j$}
15595
+ where $T'_j$ is the type which would be $T_j$ if $p_j$ had not been covariant
15596
+ (\commentary{that is, it is computed as specified below}).
15585
15597
15586
15598
\commentary{%
15587
15599
This is concerned with the dynamic type of the function object obtained by
@@ -15594,12 +15606,15 @@ \subsubsection{Super Closurization}
15594
15606
}
15595
15607
15596
15608
\LMHash{}%
15597
- Otherwise, if $S$ is a non-generic class then for $j \in 1 .. n+k$,
15609
+ Otherwise
15610
+ (\commentary{when $p_j$ is not covariant}),
15611
+ if $S$ is a non-generic class then for $j \in 1 .. n+k$,
15598
15612
$T_j$ is a type annotation that denotes the same type
15599
15613
(\ref{typeType})
15600
15614
as that which is denoted by the type annotation on
15601
15615
the corresponding parameter declaration in $D$.
15602
- If that parameter declaration has no type annotation then $T_j$ is \DYNAMIC.
15616
+ If that parameter declaration has no type annotation
15617
+ then $T_j$ is \code{Object?}.
15603
15618
15604
15619
\LMHash{}%
15605
15620
Otherwise $S$ is a generic instantiation of a generic class $G$.
@@ -15608,7 +15623,8 @@ \subsubsection{Super Closurization}
15608
15623
Then $T_j$ is a type annotation that denotes
15609
15624
$[t''_1/X''_1, \ldots, t''_{s''}/X''_{s''}]S_j$,
15610
15625
where $S_j$ is the type annotation of the corresponding parameter in $D$.
15611
- If that parameter declaration has no type annotation then $T_j$ is \DYNAMIC.
15626
+ If that parameter declaration has no type annotation
15627
+ then $T_j$ is \code{Object?}.
15612
15628
15613
15629
\LMHash{}%
15614
15630
There is one way in which
0 commit comments