blob: 53a45a5e293deeb1ab06ff956d9ca05596ecde5a (
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
25
26
|
import java.util.*;
class Base {
}
public class GenericMethodITD12 {
public static void main(String[] argv) {
List<A> as = new ArrayList<A>();
new Base().crazy(as); // A doesnt implement Foo<? extends A>
}
}
interface Foo<T> {
public void m(T t);
}
class B {}
class A implements Foo<B> {
public void m(B a) {}
}
aspect X {
<R extends Foo<? extends R>> void Base.crazy(List<R> lr) {}
}
|