type distinct: allow comparisons of type X<? extends Object> == X<array> (IDEA-135041)

This commit is contained in:
Anna Kozlova
2015-01-08 19:54:22 +01:00
parent f4d2d3e65b
commit 3d9f911dc3
3 changed files with 33 additions and 1 deletions
@@ -0,0 +1,24 @@
import java.io.Serializable;
class B {}
abstract class A {
abstract Class<?> get();
abstract Class<? extends Object> get1();
abstract Class<? super Object> get2();
abstract Class<? extends B> get3();
abstract Class<? super B> get4();
abstract Class<? extends Serializable> get5();
abstract Class<? super Serializable> get6();
{
if (get() == byte[].class);
if (get1() == byte[].class);
if (<error descr="Operator '==' cannot be applied to 'java.lang.Class<capture<? super java.lang.Object>>', 'java.lang.Class<byte[]>'">get2() == byte[].class</error>);
if (<error descr="Operator '==' cannot be applied to 'java.lang.Class<capture<? extends B>>', 'java.lang.Class<byte[]>'">get3() == byte[].class</error>);
if (<error descr="Operator '==' cannot be applied to 'java.lang.Class<capture<? super B>>', 'java.lang.Class<byte[]>'">get4() == byte[].class</error>);
if (get5() == byte[].class);
if (<error descr="Operator '==' cannot be applied to 'java.lang.Class<capture<? super java.io.Serializable>>', 'java.lang.Class<byte[]>'">get6() == byte[].class</error>);
}
}