JDK-8016196 : Inference: define supertype parameterization for wildcard-parameterized types
  • Type: Bug
  • Component: specification
  • Sub-Component: language
  • Affected Version: 5.0,7,8
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2013-06-07
  • Updated: 2023-08-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbd_majorUnresolved
Related Reports
Blocks :  
Blocks :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Reduction of subtyping constraints (ArrayList<?> <: List<? super alpha>) invokes capture in javac, leading to incorrect constraints on ivars involving capture vars; these new types also foil the argument that incorporation will terminate.

The correct behavior is unspecified: what is the parameterization of List that is a supertype of ArrayList<?>?  How do we derive it?
Comments
Also a problem for interpreting inherited inner classes of wildcard-parameterized types (JDK-8030746): what are the type arguments of the enclosing class? class Parent<T> { class C {} } class Child<T> extends Parent<Foo<T>> {} Child<?>.C // means Parent<???>.C
07-02-2017

Inference also encounters the problem in incorporation (18.3.1): when it's necessary to find "a supertype of S of the form G<S1, ..., Sn>" and "a supertype of T of the form G<T1, ..., Tn>", we need to know whether "S1 = T1" is a valid new constraint -- which depends on whether S1 is a wildcard or not.
10-11-2015

This question is also relevant for lub (4.10.4).
26-08-2014