Community
Participate
Working Groups
I have the following declarations: public interface PropertiedObject<B extends PropertiedObject<B>> public interface Model extends PropertiedObject<Model> public interface View<T extends Model,U> extends PropertiedObject<View<?,?>> Sun's compiler is perfectly happy with it the declaration of View, while eclipse's is not. From a logical standpoint the declaration makes perfect sense, so I think this is a bug with eclipse.
sorry, here are the errors Severity Description Resource In Folder Location Creation Time 2 Bound mismatch: The type View<?,?> is not a valid substitute for the bounded parameter <B extends PropertiedObject<B>> of the type PropertiedObject<B> View.java base/src/org/liberatis/sphaera/mvc line 45 November 27, 2004 1:21:22 PM Severity Description Resource In Folder Location Creation Time 2 The type View cannot extend or implement PropertiedObject<View<?,?>>. A supertype may not specify any wildcard View.java base/src/org/liberatis/sphaera/mvc line 45 November 27, 2004 1:21:22 PM
Just thought I would add what I am trying to accomplish. It mightb e helpful. I have an abstract hierarchical object called PropertiedObject. It allows a generic type for every member in the tree. Every member of the tree extends the generic type (which also extends PropertiedObject) i.e. A tree of "Model"'s A tree of "View<?,?>"'s Both Model and View extend PropertiedObject. When I defined "View": View<T,U> extends PropertiedObject<View<?,?>>, the types for things like children, grandparents, parents, etc. are logically not known. So eclipse's error that View<?,?> must be qualifed is incorrect IMHO. cheers, Eric
This was fixed a while ago. Only direct wildcards are complained against. Added GenericTypeTest#test462.