aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs154/pr203646/ExampleA.java
blob: b1ceced01caccdf6502daef922e369e0a1677d7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// ITD of a method onto a generic inner type - working example

interface I {
  interface J< T > {}
}

aspect Bang {
 public int I.J<T>.intro(T t) {return 42;}
}

class Impl implements I {
  class InnerImpl implements J<String> {
  }
}

public class ExampleA {
  public static void main(String []argv) {
    Impl i = new Impl();
    Impl.InnerImpl j = i.new InnerImpl();
    System.out.println(j.intro("foo"));
  }
}