--- /dev/null
+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";
+}
+
+
+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 { };
// public void testCFlowXMLAspectLTW_pr149096() { runTest("cflow xml concrete aspect"); }
// public void testAmbiguousBinding_pr121805() { runTest("ambiguous binding");}
// public void testNoIllegalStateExceptionWithGenericInnerAspect_pr156058() { runTest("no IllegalStateException with generic inner aspect"); }
+// public void testNegatedAnnotationMatchingProblem_pr153464() { runTest("negated annotation matching problem");}
public void testAnnotationStylePointcutNPE_pr158412() { runTest("annotation style pointcut npe"); }
public void testAnnotationStylePointcutNPE_pr158412_2() { runTest("annotation style pointcut npe - 2"); }
public void testAnnotationsCallConstructors_pr158126() { runTest("annotations, call and constructors problem");}
<ajc-test dir="bugs153/pr158412" title="annotation style pointcut npe">
<compile files="layering/Layering.aj,layering/SystemArchitektur.java" options="-1.5"/>
</ajc-test>
+
+ <ajc-test dir="bugs153/pr153464" title="negated annotation matching problem">
+ <compile files="Bug.java" options="-1.5">
+ <message kind="warning" line="99"/>
+ </compile>
+ </ajc-test>
<ajc-test dir="bugs153/pr158412" title="annotation style pointcut npe - 2">
<compile files="layering/Layering.aj,layering/SystemArchitektur.java,dao/Foo.java" options="-1.5">