]> source.dussan.org Git - aspectj.git/commitdiff
test for 120521
authoraclement <aclement>
Tue, 13 Dec 2005 09:25:38 +0000 (09:25 +0000)
committeraclement <aclement>
Tue, 13 Dec 2005 09:25:38 +0000 (09:25 +0000)
tests/bugs150/pr120521/PerTargetSubaspectError.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
tests/src/org/aspectj/systemtest/ajc150/ajc150.xml

diff --git a/tests/bugs150/pr120521/PerTargetSubaspectError.java b/tests/bugs150/pr120521/PerTargetSubaspectError.java
new file mode 100644 (file)
index 0000000..0f2443d
--- /dev/null
@@ -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
+       }
+}
index f00f601a9cd660dc9882978575b8cacb7680f190..dfc65f8606372b4c029baf55d5ce1363b4e4d602 100644 (file)
@@ -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");}
index ed4d8c1550119c4610d7ad991ce6bebfc72f38af..790dca6f97e845c9b6ece86b0a9e8a17d9bb2982 100644 (file)
      <compile files="ParameterizedDP.java,NodeImpl.java,INode.java" options="-1.5"/>
      <run class="bugs.ParameterizedDP"/>
     </ajc-test>  
+    
+    <ajc-test dir="bugs150/pr120521" pr="120521" title="named pointcut not resolved in pertarget pointcut">
+     <compile files="PerTargetSubaspectError.java"/>
+    </ajc-test>  
 
     <ajc-test dir="bugs150/pr119210" pr="119210" title="autoboxing around advice - 1">
      <compile files="TestLib.java,ThreadAspectLib.java" options="-1.5"/>