United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7148242 Regression: valid code rejected during generic type well-formedness check
JDK-7148242 : Regression: valid code rejected during generic type well-formedness check

Details
Type:
Bug
Submit Date:
2012-02-23
Status:
Closed
Updated Date:
2012-04-02
Project Name:
JDK
Resolved Date:
2012-03-19
Component:
tools
OS:
generic,windows_7
Sub-Component:
javac
CPU:
x86,unknown
Priority:
P3
Resolution:
Fixed
Affected Versions:
7,8
Fixed Versions:

Related Reports
Backport:
Duplicate:
Relates:

Sub Tasks

Description
This code does not compile:

class Pair<K, V> { }

class TypeTest {
   static abstract class A<K, V, I extends Pair<K, V>, I2 extends Pair<V, K>> {
      abstract A<V, K, I2, I> test();
   }
}

                                    

Comments
EVALUATION

This regression has been introduced by 6880344 - an additional type-variable substitution make the generic well-formedness test fail.
                                     
2012-02-23
SUGGESTED FIX

A webrev of this fix is available at the following URL:
http://hg.openjdk.java.net/jdk8/tl/langtools/rev/6aafebe9a394
                                     
2012-03-02



Hardware and Software, Engineered to Work Together