summaryrefslogtreecommitdiffstats
path: root/tests/java5/generics/itds/sharing/MethodA4.aj
blob: 192a7dc98bf5e816ad7ce42516432738b4460f34 (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 MethodA4 {
  public static void main(String []argv) {
    Base<Integer> base    = new Base<Integer>();
    List<Integer> intList = base.m();
  }
}

class Base<N extends Number> { }

aspect X {
  public List<Z> Base<Z>.m() { // OK, Z becomes N in return type
    List<Z> lz = new ArrayList<Z>();
    List<String> ls;

    return lz;
  }; 
}