summaryrefslogtreecommitdiffstats
path: root/tests/java5/generics/itds/BizarroSignatures.aj
blob: 03b683625606b04069e8b559e8092942c483e0fb (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import java.util.*;

class Victim {}

public class BizarroSignatures {
  public static void main(String []argv) {
    Victim v = new Victim();
    
    Map<Double,Double> m = new HashMap<Double,Double>();
    v.a(m);
    
    List<A> as = new ArrayList<A>();
    v.b(as);
    v.c(as);

    //v.c(as);

  }
 
}

class A implements Comparable<A> { 
  public int compareTo(A a) { return 0; }
}

aspect X { 

  public void Victim.a(Map<?,? extends Number> map) {}

  public <T extends Object & Comparable<? super T>> 
    void Victim.b(List<T> l) {}

  public <P extends Object & Comparable<? super P>> 
    void Victim.c(List<P> col) {};//return null;}
  
//  public <T extends Comparable<? super Number>> 
//    T Victim.d(Collection<T> col) {return null;}
//
//  public <T extends Comparable<T>> 
//    T Victim.e(Collection<T> col) {return null;}
//
//  public <X> 
//    X Victim.f(Collection<X> x) {return null;}
//
//  public void Victim.g(List<List<List<List<List<? extends List>>>>> wtf) {}
// 
//  public <T> 
//    void Victim.h(List <T> a,List<? extends T> b) {}
//
//  public <T extends Number> 
//    void Victim.i(Map<T,? super Number> n) {}

//  public <T> 
//    void Victim.j(T[] ts,Collection<T> c) {}
}