Is this a bug?

Zhong Yu zhong.j.yu at gmail.com
Tue Sep 24 19:17:48 PDT 2013


This program does not compile (jdk8 build 106)

public class Tmp
{
    class S{}

    interface I<S, T extends S>{}

    class C implements I<C,C>{}
}

Apparently, javac thinks the bound of T is the class S, not the type variable S.

I'm not sure if this is correct - shouldn't type variable S shadow
class S inside <>?

Thanks,
Zhong Yu


More information about the compiler-dev mailing list