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