summaryrefslogtreecommitdiffstats
path: root/tests/java5/generics/genericaspects/GenericAspectC.aj
blob: 3e1d6c6ee75d5332c4bcbeb6eef115d6f28f6c02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Decp an interface with an ITD method on it
abstract aspect GenericAspect<A> {

  interface SimpleI {}

  declare parents: A implements SimpleI;

  public int SimpleI.m() { return 4;}

}

aspect GenericAspectC extends GenericAspect<Base> {
  public static void main(String []argv) {
    Base b = new Base();

    if (!(b instanceof SimpleI)) 
      throw new RuntimeException("Base should implement SimpleI!");

    int i = b.m();
  }
}

class Base {}