On 02/04/2011 05:33 PM, Lawrence D'Oliveiro wrote:
> Here’s an example of what I mean, from section 5.1.10, pages 8990:
>
> 5.1.10 Capture Conversion
> Let G name a generic type declaration with n formal type parameters A1
> ... An with corresponding bounds U1 ... Un. There exists a capture
> conversion from G<T1 ... Tn> to G<S1 ... Sn>, where, for 1 ≤ i ≤ n :
> • If Ti is a wildcard type argument (§4.5.1) of the form ? then Si is a
> fresh type variable whose upper bound is Ui[A1 := S1, ..., An := Sn]
> and whose lower bound is the null type.
> • If Ti is a wildcard type argument of the form ? extends Bi, then Si is
> a fresh type variable whose upper bound is glb(Bi, Ui[A1 := S1, ...,
> An := Sn]) and whose lower bound is the null type, where glb(V1,...
> ,Vm) is V1& ...& Vm. It is a compiletime error if for any two
> classes (not interfaces) Vi and Vj,Vi is not a subclass of Vj or vice
> versa.
> • If Ti is a wildcard type argument of the form ? super Bi, then Si is a
> fresh type variable whose upper bound is Ui[A1 := S1, ..., An := Sn]
> and whose lower bound is Bi.
>
> In all those three cases, Si occurs in its own definition. How are you
No, it doesn't. In all those three cases, Si is defined. Each of those three
statements is a production of Si.
> supposed to make any sense of that circularity? It’s complete nonsense. The
> only way I can understand it is if all those instances of “Ui[A1 := S1, ...,
> An := Sn]” should actually be “Ui[A1 := T1, ..., An := Tn]”.
>
That would not be what they're trying to say. They're saying that, taking the
first one, the capture conversion is to a capture type Si with the upper bound
Ui, where the formal parameter Ai is substituted with the capture type Si. I
do agree that their notation is obfuscatory, but there's no typo there.

Lew
Ceci n'est pas une fenêtre.
..___________.
###]  [###
##/  *\##
#/ *  \#
##
  * 
o *  o
__________
===========
