summaryrefslogtreecommitdiffstats
path: root/tests/new/AbstractPointcutAccess.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/new/AbstractPointcutAccess.java')
-rw-r--r--tests/new/AbstractPointcutAccess.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/new/AbstractPointcutAccess.java b/tests/new/AbstractPointcutAccess.java
new file mode 100644
index 000000000..83846dfea
--- /dev/null
+++ b/tests/new/AbstractPointcutAccess.java
@@ -0,0 +1,25 @@
+import org.aspectj.testing.Tester;
+
+/** @testcase PR#619 direct use outside aspect of defined abstract pointcut */
+public abstract aspect AbstractPointcutAccess {
+ public static void main (String[] args) {
+ Tester.event("main");
+ Tester.checkAllEvents();
+ }
+ static {
+ Tester.expectEvent("main");
+ Tester.expectEvent("used");
+ }
+
+ abstract pointcut abstractPointcut();
+}
+aspect ConcretePointcutAccess extends AbstractPointcutAccess {
+ pointcut abstractPointcut() : execution(void main(..));
+}
+
+aspect AbstractPointcutUser {
+ before () : ConcretePointcutAccess.abstractPointcut() {
+ Tester.event("used");
+ }
+}
+