aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs153/pr153464/Foo.java
blob: 1167e9bb4cf22b8229076718219970f657ee2ca5 (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
25
26
27
28
29
30
import java.lang.annotation.*;

aspect TestAspect {
  // works - Derived.func() omitted
//  declare warning : execution(@Annot * *(..)) && !within(@Annot *): "hi!";

  // fails - Derived.func() not omitted
  declare warning : execution(@Annot * *(..)) && within(!@Annot *) : "within includes negated annotation";
  pointcut hasMethod() : hasmethod(@Annot * *(..));
}


class Base {
  void func() { }
}

//@Annot
class AnnotTest {
  @Annot
  class Derived extends Base {
    @Annot void func() { }
  }
//
 // class NoAnnotClass {
  //  @Annot void func() { }
  //}
}

//@Retention(RetentionPolicy.RUNTIME)
@interface Annot { };