<compile files="PcdLookup.java" />
<run class="PcdLookup"/>
</ajc-test>
+
+ <ajc-test dir="bugs" pr="29691"
+ title="Static inner aspects cannot reference user defined pointcuts">
+ <compile files="SoftWithin.java" />
+ <run class="SoftWithin"/>
+ </ajc-test>
</suite>
--- /dev/null
+import org.aspectj.testing.Tester;
+import org.aspectj.lang.*;
+import java.io.*;
+
+
+/** @testcase Bugzilla Bug 29691
+ Static inner aspects cannot reference user defined pointcuts
+
+ */
+public class SoftWithin {
+
+ static void foo() throws IOException {
+ throw new IOException();
+ }
+
+ public static void main(String[] args) throws Exception{
+ try {
+ foo();
+ } catch (SoftException se) {
+ return;
+ }
+ Tester.checkFailed("should have got SoftException");
+ }
+}
+
+
+aspect Soften {
+
+ declare soft : IOException : within(SoftWithin);
+}
+
+
+