Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #26129
| From | Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: JLS 3/e -- Lots Of Errors |
| Followup-To | comp.lang.java.programmer |
| Date | 2011-02-05 11:33 +1300 |
| Organization | Geek Central |
| Message-ID | <iihur6$v02$1@lust.ihug.co.nz> (permalink) |
| References | <iiflvc$keg$2@lust.ihug.co.nz> |
Followups directed to: comp.lang.java.programmer
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 comp.lang.java.programmer | Previous | Next | Find similar | Unroll thread
Re: JLS 3/e -- Lots Of Errors Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-02-05 11:33 +1300
csiph-web