substitute bounds (IDEA-123509)

This commit is contained in:
Anna Kozlova
2014-04-29 18:54:59 +04:00
parent 547c62c168
commit 902e51a856
5 changed files with 13 additions and 3 deletions
@@ -0,0 +1,9 @@
class Test {
interface IDo {}
interface IDoable<TDo> {}
interface IDoableFilter<TDo, TDoable extends IDoable<TDo>> {}
<TDoable extends IDoable<IDo>> void foo(IDoableFilter<IDo, ? super TDoable> filter_) {
IDoableFilter<IDo, ? super TDoable> filter = filter_;
}
}
@@ -311,7 +311,7 @@ class WithingBounds {
A<A<<error descr="Type parameter 'A' is not within its bound; should extend 'A<A>'">A</error>>> a3;
A<? extends A> a4;
A<<error descr="Type parameter '? super A' is not within its bound; should extend 'A<A<T>>'">? super A</error>> a5;
A<<error descr="Type parameter '? super A' is not within its bound; should extend 'A<A<? super A>>'">? super A</error>> a5;
A<<error descr="Type parameter 'A[]' is not within its bound; should extend 'A<A[]>'">A[]</error>> a7;
}
}
@@ -311,7 +311,7 @@ class WithingBounds {
A<A<<error descr="Type parameter 'A' is not within its bound; should extend 'A<A>'">A</error>>> a3;
A<? extends A> a4;
A<<error descr="Type parameter '? super A' is not within its bound; should extend 'A<A<T>>'">? super A</error>> a5;
A<<error descr="Type parameter '? super A' is not within its bound; should extend 'A<A<? super A>>'">? super A</error>> a5;
A<<error descr="Type parameter 'A[]' is not within its bound; should extend 'A<A[]>'">A[]</error>> a7;
}
}