type parameter cannot be inherited with different arguments as well as any other class (IDEA-57324)

This commit is contained in:
anna
2013-05-08 15:09:26 +02:00
parent 2d7229f1b6
commit d3f31f402f
4 changed files with 29 additions and 3 deletions
@@ -0,0 +1,24 @@
interface IA<T> {}
interface IB<T> extends IA<T> {}
class A {
<<error descr="'IA' cannot be inherited with different type arguments: 'java.lang.Integer' and 'java.lang.String'"></error>T extends IA<Integer> & IB<String>> void foo(){}
}
interface IA1<T> {}
interface IB1<T> extends IA1<T> {}
class A1 {
<<error descr="'IA1' cannot be inherited with different type arguments: 'java.lang.Object' and 'capture<?>'"></error>T extends IA1<Object> & IB1<?>> void foo(){}
}
interface IA2<T> {}
interface IB2<T> extends IA2<T[]> {}
class A2 {
<T extends IA2<Object[]> & IB2<?>> void foo(){}
}