summaryrefslogtreecommitdiffstats
path: root/tests/java5/generics/itds/sharing/CtorH.aj
blob: c0f9d78738b5468b20d9a44fdab7572df9f4b550 (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 CtorH {
  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>();
    Base b1 = new Base(intList);
    Base b2 = new Base(strList);
  }
}

class Base<N> { }

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