]> source.dussan.org Git - aspectj.git/commitdiff
343051
authoraclement <aclement>
Tue, 26 Apr 2011 16:11:25 +0000 (16:11 +0000)
committeraclement <aclement>
Tue, 26 Apr 2011 16:11:25 +0000 (16:11 +0000)
tests/bugs1612/pr343051/Azpect.java [new file with mode: 0644]
tests/bugs1612/pr343051/Code.java [new file with mode: 0644]
tests/bugs1612/pr343051/Code2.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java
tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml

diff --git a/tests/bugs1612/pr343051/Azpect.java b/tests/bugs1612/pr343051/Azpect.java
new file mode 100644 (file)
index 0000000..e022186
--- /dev/null
@@ -0,0 +1,13 @@
+package q;
+import p.*;
+
+privileged aspect X {
+  public void Code2.Inner.bar() {
+    Runnable r = new Runnable() {
+      public void run() {
+        System.out.println("abc");
+      }
+    };
+    r.run();
+  }
+}
diff --git a/tests/bugs1612/pr343051/Code.java b/tests/bugs1612/pr343051/Code.java
new file mode 100644 (file)
index 0000000..12f68dc
--- /dev/null
@@ -0,0 +1,7 @@
+package p;
+
+public class Code {
+  public static void main(String []argv) {
+    new Code2().foo();
+  }
+}
diff --git a/tests/bugs1612/pr343051/Code2.java b/tests/bugs1612/pr343051/Code2.java
new file mode 100644 (file)
index 0000000..c04bacf
--- /dev/null
@@ -0,0 +1,11 @@
+package p;
+
+public class Code2 {
+
+  public void foo() {
+    new Inner().bar();
+  }
+
+  class Inner {
+  }
+}
index 26140e933b5de5baaf01d59b030d7b5a27cce03d..b73590c227a2cdc5044139e079d391e1ed2b9a1a 100644 (file)
@@ -21,6 +21,10 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
  */
 public class Ajc1612Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
 
+       public void testIllegalAccessError_343051() {
+               runTest("illegalaccesserror");
+       }
+       
        public void testItitNpe_339974() {
                runTest("itit npe");
        }
index 49b27f55848cdbf7ed0ac248d666e4995e1af08a..8d7e710f51175b738934346cbf7b907e48820de5 100644 (file)
@@ -2,6 +2,15 @@
 
 <suite>
 
+<ajc-test dir="bugs1612/pr343051" title="illegalaccesserror">
+<compile files="Code.java Code2.java Azpect.java" options="-1.5"/>
+<run class="p.Code">
+<stdout>
+<line text="abc"/>
+</stdout>
+</run>
+</ajc-test>
+
 <ajc-test dir="bugs1612/pr339974" title="itit npe">
 <compile files="City.java TrafficCalculator.java" options="-1.5">
 <message kind="error" text="The nested type TrafficCalculator cannot hide an enclosing type"/>