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

class Base { }

public class GenericCtorITD1 {
  public static void main(String[] argv) { 
    // Use the generic ctor
    List<String> ls = new ArrayList<String>();
    Base bs = new Base(ls); // ok
    List<Integer> li = new ArrayList<Integer>();
    Base bi = new Base(li); // ok
  }
}


aspect X {
  <T> Base.new(List<T> elements) { }
}