summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2011-04-26 16:11:25 +0000
committeraclement <aclement>2011-04-26 16:11:25 +0000
commit8db64a9d53d8c051b3296b3ccb2c4715463cb4c0 (patch)
tree59a0e7baf7c6f8d41b59bf86a8149aebeff79e13 /tests
parent4341109730bdb423b0eecc5b01327febc4f0b230 (diff)
downloadaspectj-8db64a9d53d8c051b3296b3ccb2c4715463cb4c0.tar.gz
aspectj-8db64a9d53d8c051b3296b3ccb2c4715463cb4c0.zip
343051
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs1612/pr343051/Azpect.java13
-rw-r--r--tests/bugs1612/pr343051/Code.java7
-rw-r--r--tests/bugs1612/pr343051/Code2.java11
-rw-r--r--tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java4
-rw-r--r--tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml9
5 files changed, 44 insertions, 0 deletions
diff --git a/tests/bugs1612/pr343051/Azpect.java b/tests/bugs1612/pr343051/Azpect.java
new file mode 100644
index 000000000..e02218657
--- /dev/null
+++ b/tests/bugs1612/pr343051/Azpect.java
@@ -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
index 000000000..12f68dc54
--- /dev/null
+++ b/tests/bugs1612/pr343051/Code.java
@@ -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
index 000000000..c04bacfee
--- /dev/null
+++ b/tests/bugs1612/pr343051/Code2.java
@@ -0,0 +1,11 @@
+package p;
+
+public class Code2 {
+
+ public void foo() {
+ new Inner().bar();
+ }
+
+ class Inner {
+ }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java b/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java
index 26140e933..b73590c22 100644
--- a/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java
@@ -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");
}
diff --git a/tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml b/tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml
index 49b27f558..8d7e710f5 100644
--- a/tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml
+++ b/tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml
@@ -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"/>