aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs150/pr119539/GenericPerTypeWithin2.java
blob: 807f3d0efda07fc939a4644767842010e7b71e67 (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 GenericPerTypeWithin2 {
  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 {}