summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs150/PrivatePointcutOverriding.aj23
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java4
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/ajc150.xml7
3 files changed, 34 insertions, 0 deletions
diff --git a/tests/bugs150/PrivatePointcutOverriding.aj b/tests/bugs150/PrivatePointcutOverriding.aj
new file mode 100644
index 000000000..a5b298d8c
--- /dev/null
+++ b/tests/bugs150/PrivatePointcutOverriding.aj
@@ -0,0 +1,23 @@
+abstract aspect SuperAspect {
+
+ private pointcut matchedJP() : execution(* foo(..));
+
+ declare warning : matchedJP() : "matched join point from super advice";
+
+}
+
+public aspect PrivatePointcutOverriding extends SuperAspect {
+
+ private pointcut matchedJP() : execution(* bar(..));
+
+ declare warning : matchedJP() : "matched join point from sub advice";
+
+}
+
+class C {
+
+ void foo() {}
+
+ void bar() {}
+
+} \ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
index d2ca4d9cf..79754f8bf 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
@@ -390,6 +390,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
runTest("final itd methods on interfaces");
}
+ public void testPrivatePointcutOverriding() {
+ runTest("can't override private pointcut in abstract aspect");
+ }
+
// helper methods.....
public SyntheticRepository createRepos(File cpentry) {
diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
index 27df1824a..2b84361cd 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
+++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
@@ -494,6 +494,13 @@
</compile>
</ajc-test>
+ <ajc-test dir="bugs150" pr="108818" title="can't override private pointcut in abstract aspect">
+ <compile files="PrivatePointcutOverriding.aj">
+ <message kind="warning" line="19" text="matched join point from super advice"/>
+ <message kind="warning" line="21" text="matched join point from sub advice"/>
+ </compile>
+ </ajc-test>
+
<!-- ============================================================================ -->
<!-- ============================================================================ -->