[cdi-dev] Assignability of raw and parameterized types
ajustin at redhat.com
Mon Apr 2 05:46:40 EDT 2012
It looks correct. But ...
we have a bunch of tests in Weld -- search GenericBean<T>,
where we do just the opposite, hence I see where Marko's q came from,
as I've been hit by those failing tests as well, when I poked around Reflections.
We could change / fix this, but I see another wave of forum posts with this "issue".
e.g. just remember last change of interceptor signature stricktness :-)
> Working on the assumption that in your example User extends Persistent, then Dao<T extends Persistent> isn't assignable to Dao<User> generally, so this change is correct, surely?
> On 1 Apr 2012, at 15:12, Marko Lukša wrote:
>> How come section 5.2.3., bullet 4 was changed from:
>> • the required type parameter is an actual type, the bean type parameter is a type variable and the actual type is assignable to the upper bound, if any, of the type variable...
>> • the required type parameter is an actual type, the bean type parameter is a type variable and the actual type is assignable from the upper bound, if any, of the type variable...
>> Doesn't this mean bean Dao<T extends Persistent> will not be assignable to Dao<User>?
>> cdi-dev mailing list
>> cdi-dev at lists.jboss.org
> cdi-dev mailing list
> cdi-dev at lists.jboss.org
More information about the cdi-dev