OPERATING SYSTEM
----------------
All
FULL JDK VERSION
----------------
Starting with 7-b40
Reproduced with 7-b73. Problem introduced somewhere between b18 and b47. Does not occur with any Java 6 release.
DESCRIPTION
-----------
The testcase given here is based on java/lang/Enum.java, which cannot be compiled with the Java 7 compiler due to the error shown below.
I have tested with the builds available to me, and the failure does not occur with b18, but does occur with b47. I do not have any builds between these two so I can't narrow it down any further.
REPRODUCTION INSTRUCTIONS
-------------------------
1. Run "javac Enum.java"
2. Observe the compilation error:
==================
Enum.java:9: ordinal has private access in Enum
return ordinal - o.ordinal;
^
1 error
==================
TESTCASE SOURCE
---------------
==================
public abstract class Enum<E extends Enum<E>> {
private final int ordinal = 10;
public final int compareTo(E o) {
return ordinal - o.ordinal;
}
}
==================
Release Regression From : 6
The above release value was the last known release where this
bug was not reproducible. Since then there has been a regression.
----------------
All
FULL JDK VERSION
----------------
Starting with 7-b40
Reproduced with 7-b73. Problem introduced somewhere between b18 and b47. Does not occur with any Java 6 release.
DESCRIPTION
-----------
The testcase given here is based on java/lang/Enum.java, which cannot be compiled with the Java 7 compiler due to the error shown below.
I have tested with the builds available to me, and the failure does not occur with b18, but does occur with b47. I do not have any builds between these two so I can't narrow it down any further.
REPRODUCTION INSTRUCTIONS
-------------------------
1. Run "javac Enum.java"
2. Observe the compilation error:
==================
Enum.java:9: ordinal has private access in Enum
return ordinal - o.ordinal;
^
1 error
==================
TESTCASE SOURCE
---------------
==================
public abstract class Enum<E extends Enum<E>> {
private final int ordinal = 10;
public final int compareTo(E o) {
return ordinal - o.ordinal;
}
}
==================
Release Regression From : 6
The above release value was the last known release where this
bug was not reproducible. Since then there has been a regression.
- duplicates
-
JDK-7012200 generified code fails to compile
- Closed
- relates to
-
JDK-6558551 Type variables incorrectly inherits private members
- Closed
-
JDK-6711619 javac doesn't allow access to protected members in intersection types
- Closed
-
JDK-6644562 4.9: Simplify membership of single-bound intersection types
- Open