-
Bug
-
Resolution: Unresolved
-
P4
-
8
Per JDK-6480391 and its update to 4.5.1, "The wildcard ? extends Object is equivalent to the unbounded wildcard ?"
This is a subtle point and easy to overlook in a system that represents these two wildcards differently, soJDK-6480391 also added the following rules for type argument containment:
? extends T <= ?
? super T <= ? extends Object
Another rule should be added, also for clarity:
***? <= ? extends Object***
(Note that 18.2.3 already includes a similar rule for inference involving type argument containment.)
This is a subtle point and easy to overlook in a system that represents these two wildcards differently, so
? extends T <= ?
? super T <= ? extends Object
Another rule should be added, also for clarity:
***? <= ? extends Object***
(Note that 18.2.3 already includes a similar rule for inference involving type argument containment.)
- relates to
-
JDK-6480391 Unbounded wildcard '?' means '? extends Object'
-
- Closed
-