aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs150/pr119539/GenericPerTypeWithin.java
blob: c7ee849c2b737532fd84ee947b1efbb7c2f62d09 (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
package bugs;

public class GenericPerTypeWithin {
  public static void main(String[] args) {
    new C();
  }
}

class C {
  C() {}
}
class B {
  B() {}	
}


abstract aspect Singleton<Target> pertypewithin(Target) {
    pointcut creation() : execution(Target+.new()) ;
    pointcut creationOfAnything(): execution(*.new());
    before() : creation() {  }
    before() : creationOfAnything() {} // should not match B.new() because of the ptw
}

aspect A extends Singleton<C> {}