question on generics in class type declarations

N

Neal Gafter

I would like to have the possibility to introduce named types that
are
not type parameters of the parameterized class. For example:

class A<T extends B<U super T>> {
private U value;

}

I don't see why this shouldn't be allowed.

You'd write it this way:

class A<U, T extends U&B<U>> {
private U value;
}

It doesn't make any sense to me that you don't want U to be a parameter
of A.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,738
Latest member
JinaMacvit

Latest Threads

Top