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