@@ -15738,7 +15738,11 @@ \subsubsection{Instance Method Closurization}
15738
15738
\LMHash{}%
15739
15739
For each parameter $p_j$, $j \in 1 .. n+k$, if $p_j$ is covariant
15740
15740
(\ref{covariantParameters})
15741
- then $T_j$ is \DYNAMIC. %% No user code will see this, avoid downcast in body.
15741
+ then $T_j$ is \code{Object?}.
15742
+ The corresponding actual argument in the body is replaced by
15743
+ \code{$p_j$\,\,\AS\,\,$T'_j$}
15744
+ where $T'_j$ is the type which would be $T_j$ if $p_j$ had not been covariant
15745
+ (\commentary{that is, it is computed as specified below}).
15742
15746
15743
15747
\commentary{%
15744
15748
This is concerned with the dynamic type of the function object obtained by
@@ -15751,12 +15755,15 @@ \subsubsection{Instance Method Closurization}
15751
15755
}
15752
15756
15753
15757
\LMHash{}%
15754
- Otherwise, if $T$ is a non-generic class then for $j \in 1 .. n+k$,
15758
+ Otherwise
15759
+ (\commentary{when $p_j$ is not covariant}),
15760
+ if $T$ is a non-generic class then for $j \in 1 .. n+k$,
15755
15761
$T_j$ is a type annotation that denotes the same type
15756
15762
(\ref{typeType})
15757
15763
as that which is denoted by the type annotation on
15758
15764
the corresponding parameter declaration in $D$.
15759
- If that parameter declaration has no type annotation then $T_j$ is \DYNAMIC.
15765
+ If that parameter declaration has no type annotation
15766
+ then $T_j$ is \code{Object?}.
15760
15767
15761
15768
\LMHash{}%
15762
15769
Otherwise $T$ is a generic instantiation of a generic class $G$.
@@ -15765,7 +15772,8 @@ \subsubsection{Instance Method Closurization}
15765
15772
Then $T_j$ is a type annotation that denotes
15766
15773
$[t''_1/X''_1, \ldots, t''_{s''}/X''_{s''}]S_j$,
15767
15774
where $S_j$ is the type annotation of the corresponding parameter in $D$.
15768
- If that parameter declaration has no type annotation then $T_j$ is \DYNAMIC.
15775
+ If that parameter declaration has no type annotation
15776
+ then $T_j$ is \code{Object?}.
15769
15777
15770
15778
\LMHash{}%
15771
15779
There is one way in which
@@ -15896,7 +15904,11 @@ \subsubsection{Super Closurization}
15896
15904
\LMHash{}%
15897
15905
For each parameter $p_j$, $j \in 1 .. n+k$, if $p_j$ is covariant
15898
15906
(\ref{covariantParameters})
15899
- then $T_j$ is \DYNAMIC.
15907
+ then $T_j$ is \code{Object?}.
15908
+ The corresponding actual argument in the body is replaced by
15909
+ \code{$p_j$\,\,\AS\,\,$T'_j$}
15910
+ where $T'_j$ is the type which would be $T_j$ if $p_j$ had not been covariant
15911
+ (\commentary{that is, it is computed as specified below}).
15900
15912
15901
15913
\commentary{%
15902
15914
This is concerned with the dynamic type of the function object obtained by
@@ -15909,12 +15921,15 @@ \subsubsection{Super Closurization}
15909
15921
}
15910
15922
15911
15923
\LMHash{}%
15912
- Otherwise, if $S$ is a non-generic class then for $j \in 1 .. n+k$,
15924
+ Otherwise
15925
+ (\commentary{when $p_j$ is not covariant}),
15926
+ if $S$ is a non-generic class then for $j \in 1 .. n+k$,
15913
15927
$T_j$ is a type annotation that denotes the same type
15914
15928
(\ref{typeType})
15915
15929
as that which is denoted by the type annotation on
15916
15930
the corresponding parameter declaration in $D$.
15917
- If that parameter declaration has no type annotation then $T_j$ is \DYNAMIC.
15931
+ If that parameter declaration has no type annotation
15932
+ then $T_j$ is \code{Object?}.
15918
15933
15919
15934
\LMHash{}%
15920
15935
Otherwise $S$ is a generic instantiation of a generic class $G$.
@@ -15923,7 +15938,8 @@ \subsubsection{Super Closurization}
15923
15938
Then $T_j$ is a type annotation that denotes
15924
15939
$[t''_1/X''_1, \ldots, t''_{s''}/X''_{s''}]S_j$,
15925
15940
where $S_j$ is the type annotation of the corresponding parameter in $D$.
15926
- If that parameter declaration has no type annotation then $T_j$ is \DYNAMIC.
15941
+ If that parameter declaration has no type annotation
15942
+ then $T_j$ is \code{Object?}.
15927
15943
15928
15944
\LMHash{}%
15929
15945
There is one way in which
0 commit comments