Subtyping constraint and unchecked conversion

Dan Smith daniel.smith at oracle.com
Tue Oct 6 19:28:50 UTC 2015


> On Sep 11, 2015, at 12:06 PM, Georgiy Rakov <georgiy.rakov at oracle.com> wrote:
> 
> Foo <: Foo<Integer>
> 4. Since raw type is not a subtype of corresponding generic type parameterization, and unchecked conversion is not applied here too,     compile time error should occur, but it doesn't. If it were a type compatibility constraint then it will be reduced to true, but this is a subtyping constraint.

> In general this looks like a javac bug. Could you please tell if it really is.

Yep, known bug:
https://bugs.openjdk.java.net/browse/JDK-8026527

—Dan


More information about the compiler-dev mailing list