summaryrefslogtreecommitdiffstats
path: root/tests/java5/generics/itds/sharing/MethodH.aj
blob: 8df78ae30a3801510cce0f363549390ea857e6a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import java.util.*;

public class MethodH {
  public static void main(String []argv) {
    Base<Integer> baseInt    = new Base<Integer>();
    Base<String>  baseString = new Base<String>();

    List<Integer> intList = new ArrayList<Integer>();
    List<String>  strList = new ArrayList<String>();
    List<Integer> li = baseInt.m(intList);
    List<String>  ls = baseString.m(strList);
  }
}

class Base<N> { }

aspect X {
  public List<Z> Base<Z>.m(List<Z> lz) { return null;} // OK, Z becomes N in first case, S in the second ;)
}