This program:
public class Tmp
{
class S{}
interface I<S, T extends S>{}
class C implements I<C,C>{}
}
fails with errors:
Tmp.java:7: error: type argument Tmp.C is not within bounds of type-variable S
class C implements I<C,C>{}
^
where S is a type-variable:
S extends Object declared in interface I
Tmp.java:7: error: type argument Tmp.C is not within bounds of type-variable T
class C implements I<C,C>{}
^
where T is a type-variable:
T extends Tmp.S declared in interface I
2 errors
if you comment class S out it compiles just fine.
reported by Zhong Yu in compiler-dev list