FULL PRODUCT VERSION :
java version "1.7.0-ea"
Java(TM) SE Runtime Environment (build 1.7.0-ea-b130)
Java HotSpot(TM) Server VM (build 21.0-b02, mixed mode)
A DESCRIPTION OF THE PROBLEM :
Attached source code does not compile
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Try to compile the attached source code
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The code should compile
ACTUAL -
The code does not compile.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
name clash: <T>clone() in JavacBug and clone() in Superclass have the same erasure, yet neither overrides the other
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package bugs;
public abstract class JavacBug extends Superclass
{
abstract <T extends JavacBug> T clone () throws CloneNotSupportedException;
}
class Superclass
{
@Override
public Superclass clone () throws CloneNotSupportedException
{
return (Superclass) super.clone ();
}
}
---------- END SOURCE ----------