Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #31919 > unrolled thread
| Started by | Eric Sosman <esosman@comcast-dot-net.invalid> |
|---|---|
| First post | 2015-07-02 07:38 -0400 |
| Last post | 2015-07-02 07:38 -0400 |
| 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: Direct Supertypes? Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-07-02 07:38 -0400
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
|---|---|
| Date | 2015-07-02 07:38 -0400 |
| Subject | Re: Direct Supertypes? |
| Message-ID | <mn37of$5vv$1@dont-email.me> |
On 7/1/2015 8:42 PM, Stefan Ram wrote:
> There once was a publication called »JLS 7«, and it
> had this definition:
>
> 4.10.2 Subtyping among Class and Interface Types
>
> Given a generic type declaration C<F1,...,Fn>, the direct
> supertypes of the parameterized type C<T1,...,Tn> are all
> of the following:
> o The direct superclasses of C.
> o The direct superinterfaces of C.
> o The type Object, if C is an interface type with no direct
> superinterfaces.
> o The raw type C.
>
> AFAIK, there is no special section for non-generic
> supertypes, so I assume that the above is valid for
> non-generic types C too (with n = 0).
Since the quoted language specifically said "a generic
type," the assumption seems none too reliable ...
> Now there is a publication called »JLS 8«, and it
> has this definition:
>
> 4.10.2 Subtyping among Class and Interface Types
> Given a non-generic type declaration C, the direct
> supertypes of the type C are all of the following:
> o The direct superclass of C (§8.1.4).
> o The direct superinterfaces of C (§8.1.5).
> o The type Object, if C is an interface type with no
> direct superinterfaces (§9.1.3).
This is the new material in JLS 8, inserted immediately
before a nearly exact replica of the JLS 7 text you quoted.
One of the few differences between the 7 and 8 versions is
that 8 adds "(n > 0)" ...
> No more »raw type C« for non-generic type declarations?
>
> So, java.lang.String once was a direct supertype of
> java.lang.String, but today it is not?
As I understand the original, String was never a direct
supertype of String, because String is not and never was
a generic type.
--
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM
Back to top | Article view | comp.lang.java.programmer
csiph-web