@@ -15761,7 +15761,11 @@ \subsubsection{Instance Method Closurization}
1576115761\LMHash{}%
1576215762For each parameter $p_j$, $j \in 1 .. n+k$, if $p_j$ is covariant
1576315763(\ref{covariantParameters})
15764- then $T_j$ is \DYNAMIC. %% No user code will see this, avoid downcast in body.
15764+ then $T_j$ is \code{Object?}.
15765+ The corresponding actual argument in the body is replaced by
15766+ \code{$p_j$\,\,\AS\,\,$T'_j$}
15767+ where $T'_j$ is the type which would be $T_j$ if $p_j$ had not been covariant
15768+ (\commentary{that is, it is computed as specified below}).
1576515769
1576615770\commentary{%
1576715771 This is concerned with the dynamic type of the function object obtained by
@@ -15774,12 +15778,15 @@ \subsubsection{Instance Method Closurization}
1577415778}
1577515779
1577615780\LMHash{}%
15777- Otherwise, if $T$ is a non-generic class then for $j \in 1 .. n+k$,
15781+ Otherwise
15782+ (\commentary{when $p_j$ is not covariant}),
15783+ if $T$ is a non-generic class then for $j \in 1 .. n+k$,
1577815784$T_j$ is a type annotation that denotes the same type
1577915785(\ref{typeType})
1578015786as that which is denoted by the type annotation on
1578115787the corresponding parameter declaration in $D$.
15782- If that parameter declaration has no type annotation then $T_j$ is \DYNAMIC.
15788+ If that parameter declaration has no type annotation
15789+ then $T_j$ is \code{Object?}.
1578315790
1578415791\LMHash{}%
1578515792Otherwise $T$ is a generic instantiation of a generic class $G$.
@@ -15788,7 +15795,8 @@ \subsubsection{Instance Method Closurization}
1578815795Then $T_j$ is a type annotation that denotes
1578915796$[t''_1/X''_1, \ldots, t''_{s''}/X''_{s''}]S_j$,
1579015797where $S_j$ is the type annotation of the corresponding parameter in $D$.
15791- If that parameter declaration has no type annotation then $T_j$ is \DYNAMIC.
15798+ If that parameter declaration has no type annotation
15799+ then $T_j$ is \code{Object?}.
1579215800
1579315801\LMHash{}%
1579415802There is one way in which
@@ -15919,7 +15927,11 @@ \subsubsection{Super Closurization}
1591915927\LMHash{}%
1592015928For each parameter $p_j$, $j \in 1 .. n+k$, if $p_j$ is covariant
1592115929(\ref{covariantParameters})
15922- then $T_j$ is \DYNAMIC.
15930+ then $T_j$ is \code{Object?}.
15931+ The corresponding actual argument in the body is replaced by
15932+ \code{$p_j$\,\,\AS\,\,$T'_j$}
15933+ where $T'_j$ is the type which would be $T_j$ if $p_j$ had not been covariant
15934+ (\commentary{that is, it is computed as specified below}).
1592315935
1592415936\commentary{%
1592515937 This is concerned with the dynamic type of the function object obtained by
@@ -15932,12 +15944,15 @@ \subsubsection{Super Closurization}
1593215944}
1593315945
1593415946\LMHash{}%
15935- Otherwise, if $S$ is a non-generic class then for $j \in 1 .. n+k$,
15947+ Otherwise
15948+ (\commentary{when $p_j$ is not covariant}),
15949+ if $S$ is a non-generic class then for $j \in 1 .. n+k$,
1593615950$T_j$ is a type annotation that denotes the same type
1593715951(\ref{typeType})
1593815952as that which is denoted by the type annotation on
1593915953the corresponding parameter declaration in $D$.
15940- If that parameter declaration has no type annotation then $T_j$ is \DYNAMIC.
15954+ If that parameter declaration has no type annotation
15955+ then $T_j$ is \code{Object?}.
1594115956
1594215957\LMHash{}%
1594315958Otherwise $S$ is a generic instantiation of a generic class $G$.
@@ -15946,7 +15961,8 @@ \subsubsection{Super Closurization}
1594615961Then $T_j$ is a type annotation that denotes
1594715962$[t''_1/X''_1, \ldots, t''_{s''}/X''_{s''}]S_j$,
1594815963where $S_j$ is the type annotation of the corresponding parameter in $D$.
15949- If that parameter declaration has no type annotation then $T_j$ is \DYNAMIC.
15964+ If that parameter declaration has no type annotation
15965+ then $T_j$ is \code{Object?}.
1595015966
1595115967\LMHash{}%
1595215968There is one way in which
0 commit comments