summaryrefslogtreecommitdiffstats
path: root/tests/java5/generics/itds/FieldITDOnGeneric.aj
blob: 9fb784b62618bb15b008ec498ae60b9410b4c828 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
 * Static ITD of a field onto a generic type that utilises
 * a type variable from the target generic
 */
import java.util.*;

class MathUtils<N> { 

}

public class FieldITDOnGenericType {
  public static void main(String[] argv) {
    MathUtils<Integer> mu = new MathUtils<Integer>();
    mu.n=42;
    System.err.prinltn(">"+mu.n);
  }
}

aspect X {
  E MathUtils<E>.n;
}