JDK-8030729 : Lambda Spec: Always depend on the resolution of capture vars
  • Type: Bug
  • Component: specification
  • Sub-Component: language
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-12-18
  • Updated: 2014-08-08
  • Resolved: 2013-12-18
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.
JDK 8
8Fixed
Related Reports
Relates :  
Relates :  
Description
Given an inference bound like

z <: Foo<t>

Where 'z' is a capture var, it should be the case that 't' depends on the resolution of 'z'.  (This is unusual -- usually the dependency goes the other direction, with 'z' depending on 't'.)

Currently, no dependency between the two is specified.

Fortunately, incorporation passes most useful information from 'z' to 't' anyway, but not always:

interface PonyList<T extends Pony> extends List<T> {}
PonyList<z> = capture(PonyList<? extends x>)
z <: Bar<t>
Comments
Updated text for 18.4: ***Consider a bound of one of the following forms, where T is either an inference variable �� or a type that mentions ��***: �� = T �� <: T T = �� T <: �� ***Given such a bound, if �� appears on the left-hand side of another bound of the form G<..., ��, ...> = capture(G<...>), then �� depends on the resolution of ��. Otherwise, �� depends on the resolution of ��.*** An inference variable �� appearing on the left-hand side of a bound of the form G<..., ��, ...> = capture(G<...>) depends on the resolution of every other inference variable mentioned in this bound (on both sides of the = sign). [Moved this down from above.] An inference variable �� also depends on the resolution of itself, as well as the resolution of an inference variable �� if there exists an inference variable �� such that �� depends on the resolution of �� and �� depends on the resolution of ��.
18-12-2013