Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #26129 > unrolled thread
| Started by | Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> |
|---|---|
| First post | 2011-02-05 11:33 +1300 |
| Last post | 2011-02-05 11:33 +1300 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.java.programmer
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: JLS 3/e -- Lots Of Errors Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-02-05 11:33 +1300
| From | Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> |
|---|---|
| Date | 2011-02-05 11:33 +1300 |
| Subject | Re: JLS 3/e -- Lots Of Errors |
| Message-ID | <iihur6$v02$1@lust.ihug.co.nz> |
Here’s an example of what I mean, from section 5.1.10, pages 89-90:
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 compile-time 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
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]”.
Back to top | Article view | comp.lang.java.programmer
csiph-web