-
Bug
-
Resolution: Unresolved
-
P4
-
None
In javac, the capture of C<? super Object> is C<Object>, not C<CAP>. More generally, where the declaration-site upper bound is B, C<? super T> maps to C<T> if T = B (we could generalize this to B <: T, since well-formedness already requires that T <: B).
This behavior is unspecified, but could be considered as an enhancement to JLS, since it is longstanding compiler behavior.
This behavior is unspecified, but could be considered as an enhancement to JLS, since it is longstanding compiler behavior.
- relates to
-
JDK-8054937 5.1.10: Fresh capture variables sometimes can't conform to bounds
- Open
-
JDK-8033437 javac, inconsistent generic types behaviour when compiling together vs. separate
- Closed