-
Bug
-
Resolution: Cannot Reproduce
-
P5
-
None
-
5.0
-
x86
-
linux
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux [machine name] 2.6.3-7mdk-i686-up-4GB #1 Wed Mar 17 15:17:23 CET 2004 i686 unknown unknown GNU/Linux
A DESCRIPTION OF THE PROBLEM :
(Referring to code in "Source code for an executable test case" section)
Classes AA, CC and DD compile just fine. However BB do not, with the error copied below, even though the method signatures are identical up to consistant renaming of bound variables.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Simple compile with 5.0.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Compile without error.
ACTUAL -
Error message below.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
BB is not abstract and does not override abstract method <X>m(X) in AA
class BB<U, V extends AA<U, V>> implements AA<U,V> {
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
interface AA<W, Z extends AA<W, Z>> {
public <X extends AA<W, X>> boolean m(X that);
}
class BB<U, V extends AA<U, V>> implements AA<U,V> {
public <T extends AA<U, T>> boolean m(T that) { return false; }
}
interface CC<S extends CC<S>> {
public <R extends CC<R>> boolean n(R that);
}
class DD<P extends CC<P>> implements CC<P> {
public <Q extends CC<Q>> boolean n(Q that) { return false; }
}
---------- END SOURCE ----------
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux [machine name] 2.6.3-7mdk-i686-up-4GB #1 Wed Mar 17 15:17:23 CET 2004 i686 unknown unknown GNU/Linux
A DESCRIPTION OF THE PROBLEM :
(Referring to code in "Source code for an executable test case" section)
Classes AA, CC and DD compile just fine. However BB do not, with the error copied below, even though the method signatures are identical up to consistant renaming of bound variables.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Simple compile with 5.0.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Compile without error.
ACTUAL -
Error message below.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
BB is not abstract and does not override abstract method <X>m(X) in AA
class BB<U, V extends AA<U, V>> implements AA<U,V> {
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
interface AA<W, Z extends AA<W, Z>> {
public <X extends AA<W, X>> boolean m(X that);
}
class BB<U, V extends AA<U, V>> implements AA<U,V> {
public <T extends AA<U, T>> boolean m(T that) { return false; }
}
interface CC<S extends CC<S>> {
public <R extends CC<R>> boolean n(R that);
}
class DD<P extends CC<P>> implements CC<P> {
public <Q extends CC<Q>> boolean n(Q that) { return false; }
}
---------- END SOURCE ----------
- relates to
-
JDK-6729401 Compiler error when using F-bounded generics with free type variables
- Closed