Suppose I have some Java code like this (won't compile):
class MyGenericClass<T extends SomeInterface, U extends SomeClass & T>{}
The trouble is, I can't declare U as is, because when listing bounds, the class must come first, and T might be a class. Is there an obvious work around here? If not, it seems that you'd be forced into doing unchecked casts sometimes, which is unfortunate.