summaryrefslogtreecommitdiff
path: root/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/InheritedWithDifferentArgsInTypeParams.java
blob: a1c0d83bc64aee408e48130b443758249674dffa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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 {
    <<error descr="'IA2' cannot be inherited with different type arguments: 'java.lang.Object[]' and 'capture<?>[]'"></error>T extends IA2<Object[]> & IB2<?>> void foo(){}
}