]> source.dussan.org Git - aspectj.git/commitdiff
153464 - testcase in progress
authoraclement <aclement>
Tue, 3 Oct 2006 15:20:44 +0000 (15:20 +0000)
committeraclement <aclement>
Tue, 3 Oct 2006 15:20:44 +0000 (15:20 +0000)
tests/bugs153/pr153464/Foo.java [new file with mode: 0644]

diff --git a/tests/bugs153/pr153464/Foo.java b/tests/bugs153/pr153464/Foo.java
new file mode 100644 (file)
index 0000000..1167e9b
--- /dev/null
@@ -0,0 +1,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 { };