From ae500c6ac89fef8b7bb6cf4bd2a9cf1ec16cdd6a Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 13 Dec 2005 09:25:38 +0000 Subject: [PATCH] test for 120521 --- .../pr120521/PerTargetSubaspectError.java | 18 ++++++++++++++++++ .../aspectj/systemtest/ajc150/Ajc150Tests.java | 1 + .../org/aspectj/systemtest/ajc150/ajc150.xml | 4 ++++ 3 files changed, 23 insertions(+) create mode 100644 tests/bugs150/pr120521/PerTargetSubaspectError.java diff --git a/tests/bugs150/pr120521/PerTargetSubaspectError.java b/tests/bugs150/pr120521/PerTargetSubaspectError.java new file mode 100644 index 000000000..0f2443dad --- /dev/null +++ b/tests/bugs150/pr120521/PerTargetSubaspectError.java @@ -0,0 +1,18 @@ +package bugs; + +public class PerTargetSubaspectError { + public static void main(String[] args) { + C.run(); + } + static class C { + static void run() {} + } + pointcut doit() : execution(void C.run()); + + // no error if not pertarget + static aspect CPT pertarget(pc()){ + // no error if doit() defined in CPT + protected pointcut pc() : doit(); // unexpected CE + before() : doit() {} // no CE + } +} diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java index f00f601a9..dfc65f860 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java @@ -41,6 +41,7 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { protected File getSpecFile() { return new File("../tests/src/org/aspectj/systemtest/ajc150/ajc150.xml"); } + //public void testNamedPointcutPertarget_pr120521() { runTest("named pointcut not resolved in pertarget pointcut");} public void testDollarClasses_pr120474() { runTest("Dollar classes");} public void testGenericPTW_pr119539_1() { runTest("generic pertypewithin aspect - 1");} public void testGenericPTW_pr119539_2() { runTest("generic pertypewithin aspect - 2");} diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml index ed4d8c155..790dca6f9 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -78,6 +78,10 @@ + + + + -- 2.39.5