JDK-8159970 : javac, JLS8 18.2.4 is not completely implemented by the compiler
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 9
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2016-06-21
  • Updated: 2022-07-22
  • Resolved: 2016-06-28
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 9
9 b126Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Relates :  
Description
There are cases where instantiation shouldn't be used by the compiler like for inferring the parameterization of functional interfaces, avoiding instantiation for this case has uncovered the issue. In particular the part of the spec that is not implemented is the one concerning wildcards:

...
A constraint formula of the form ‹ S = T ›, where S and T are type arguments (§4.5.1),
is reduced as follows:
• If S and T are types, the constraint is reduced as described above.
• If S has the form ? and T has the form ? , the constraint reduces to true.
• If S has the form ? and T has the form ? extends T' , the constraint reduces to
‹ Object = T' ›.
• If S has the form ? extends S' and T has the form ? , the constraint reduces to
‹ S' = Object ›.
• If S has the form ? extends S' and T has the form ? extends T' , the constraint
reduces to ‹ S' = T' ›.
• If S has the form ? super S' and T has the form ? super T' , the constraint reduces
to ‹ S' = T' ›.
• Otherwise, the constraint reduces to false.
Comments
See JDK-8030148 for the origination of the spec rules.
11-08-2016

URL: http://hg.openjdk.java.net/jdk9/jdk9/langtools/rev/30bfbfa94fad User: lana Date: 2016-07-06 20:17:30 +0000
06-07-2016

ccc: http://ccc.us.oracle.com/8159970
29-06-2016

URL: http://hg.openjdk.java.net/jdk9/dev/langtools/rev/30bfbfa94fad User: vromero Date: 2016-06-28 22:44:03 +0000
28-06-2016