diff options
author | acolyer <acolyer> | 2005-08-19 16:51:30 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-08-19 16:51:30 +0000 |
commit | 86ce1f7ce2a4be24e55a0eafc96de86142ce1278 (patch) | |
tree | 511d007aca7d387d9b92000a7a2d0cb3360ef593 /tests | |
parent | 92c16e8dc34f86500628a825141cd035bdf1bc4a (diff) | |
download | aspectj-86ce1f7ce2a4be24e55a0eafc96de86142ce1278.tar.gz aspectj-86ce1f7ce2a4be24e55a0eafc96de86142ce1278.zip |
fix for pr86057, overriding of final pointcut
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs150/pr86057.aj | 11 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java | 4 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/ajc150.xml | 6 |
3 files changed, 21 insertions, 0 deletions
diff --git a/tests/bugs150/pr86057.aj b/tests/bugs150/pr86057.aj new file mode 100644 index 000000000..30861a262 --- /dev/null +++ b/tests/bugs150/pr86057.aj @@ -0,0 +1,11 @@ +abstract aspect Base { + + public final pointcut foo() : execution(* *(..)); + +} + +aspect Sub extends Base { + + public pointcut foo() : execution(* *(..)) && args(String); + +}
\ 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 213213497..f4ed350fa 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java @@ -238,6 +238,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { runTest("void field type in pointcut expression"); } + public void testPointcutOverriding() { + runTest("overriding final pointcut from super-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 a8a2967c6..da8d9e661 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -77,6 +77,12 @@ <message line="3" kind="error" text="fields cannot have a void type"/> </compile> </ajc-test> + + <ajc-test dir="bugs150" pr="86057" title="overriding final pointcut from super-aspect"> + <compile files="pr86057.aj"> + <message line="9" kind="error" text="can't override final pointcut Base.foo()"/> + </compile> + </ajc-test> <ajc-test dir="bugs150" pr="78707" title="before returning advice not allowed!"> <compile files="pr78707.aj"> |