--- /dev/null
+package abc;
+import org.aspectj.lang.annotation.*;
+
+@Aspect
+public class pr138215 {
+
+ @DeclareWarning("fooExecution()")
+ public static final String warning = "no foos please";
+
+ @Pointcut("execution(* foo())")
+ public void fooExecution() {}
+
+}
+
+class Fooey {
+
+ public void foo() {}
+
+}
\ No newline at end of file
--- /dev/null
+public aspect PerThisWithReference perthis(mypc()) {
+
+
+ pointcut mypc() : SomeOtherType.pc();
+
+
+}
\ No newline at end of file
--- /dev/null
+public aspect SomeOtherType {
+
+ public pointcut pc() : execution(* *(..));
+
+}
\ No newline at end of file
--- /dev/null
+import org.aspectj.lang.annotation.*;
+
+@Aspect("perthis(pc())")
+public class AtAspectWithPerClause {
+
+ @Pointcut("execution(* *(..))")
+ public void pc() {}
+
+}
+
+@Aspect
+class Foo {
+
+ @Pointcut("execution(* *(..))")
+ public void pc() {}
+
+}
\ No newline at end of file
--- /dev/null
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Tx {
+ boolean readOnly() default false;
+}
+
+public aspect DoubleAnnotationMatching {
+
+
+ pointcut methodInTxType(Tx tx) :
+ execution(* *(..)) && @this(tx) && if(tx.readOnly());
+
+ pointcut txMethod(Tx tx) :
+ execution(* *(..)) && @annotation(tx) && if(tx.readOnly());
+
+ pointcut transactionalOperation() :
+ methodInTxType(Tx) || txMethod(Tx);
+
+ before() : transactionalOperation() {
+ // do something
+ }
+
+}
+
+@Tx class Foo {
+
+ public void foo() {}
+
+ @Tx public void bar() {}
+
+
+}
\ No newline at end of file
public void testStackOverflow_pr136258() { runTest("stack overflow");}
public void testIncorrectOverridesEvaluation13() { runTest("incorrect overrides evaluation - 1.3"); }
public void testIncorrectOverridesEvaluation15() { runTest("incorrect overrides evaluation - 1.5"); }
+
+ // known failures, uncomment when working.
+// public void testReferencePCutInDeclareWarning_pr138215() { runTest("Reference pointcut fails inside @DeclareWarning");}
+// public void testReferencePCutInPerClause_pr138219() { runTest("Can't use a FQ Reference pointcut in any pointcut expression referenced by a per-clause");}
+// public void testDoubleAnnotationMatching_pr138223() { runTest("Double at annotation matching (no binding)");}
+// this next one reported as a bug by Rob Harrop, but I can't reproduce the failure yet...
+//public void testAtAspectWithReferencePCPerClause_pr138220() { runTest("@Aspect with reference pointcut in perclause");}
+
/////////////////////////////////////////
public static Test suite() {
return XMLBasedAjcTestCase.loadSuite(Ajc152Tests.class);
</compile>
</ajc-test>
+ <ajc-test dir="bugs152/pr138215" pr="138215" title="Reference pointcut fails inside @DeclareWarning">
+ <compile files="pr138215.aj" options="-1.5">
+ <message kind="warning" line="17" text="no foos please"/>
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs152/pr138219" pr="138219" title="Can't use a FQ Reference pointcut in any pointcut expression referenced by a per-clause">
+ <compile files="PerThisWithReference.aj,SomeOtherType.aj" options="-1.5">
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs152/pr138220" pr="138220" title="@Aspect with reference pointcut in perclause">
+ <compile files="AtAspectWithPerClause.aj" options="-1.5">
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs152/pr138223" pr="138223" title="Double at annotation matching (no binding)">
+ <compile files="DoubleAnnotationMatching.aj" options="-1.5">
+ </compile>
+ </ajc-test>
+
</suite>
\ No newline at end of file