Details
-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
1.1.PFD, 1.1.FD
-
None
-
None
Description
Say we have the following required type:
Dao<X extends Medium>
and classes:
class Small {...} class Medium extends Small {...} class Big extends Medium {...}
According to the last bullet of section 5.2.4.,
bean type Dao<X extends Small> is assignable to the required type Dao<X extends Medium>, since the required type parameter and bean type parameter are both type variables and the upper bound of the required type parameter (Medium) is assignable to the upper bound of the bean type parameter (Small).
On the other hand, according to the same rules, bean type Dao<X extends Big> is not assignable to required type Dao<X extends Medium>.
It should be the other way around.
Bullet 5 should be corrected in the same way bullet 4 was corrected in CDI-85. The upper bound of the required type parameter should be assignable from the upper bound of the bean type parameter.