mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 08:45:34 +07:00
capture conversion: collect all type parameter's bounds during capture conversion; make sure collected upper bound is used after capture type is normalized
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
import java.util.List;
|
||||
|
||||
class G<T extends List<String> & Runnable> {
|
||||
T get() {return null;}
|
||||
}
|
||||
|
||||
interface I extends List<String>, Runnable {}
|
||||
|
||||
abstract class Test {
|
||||
abstract G<? super I> m();
|
||||
|
||||
{
|
||||
m().get().run();
|
||||
String s = m().get().get(0);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -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<? super A>>'">? super A</error>> a5;
|
||||
A<<error descr="Type parameter '? super A' is not within its bound; should extend '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;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -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<? super A>>'">? super A</error>> a5;
|
||||
A<<error descr="Type parameter '? super A' is not within its bound; should extend '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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user