--- /dev/null
+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();
+ }
+}
--- /dev/null
+package p;
+
+public class Code {
+ public static void main(String []argv) {
+ new Code2().foo();
+ }
+}
--- /dev/null
+package p;
+
+public class Code2 {
+
+ public void foo() {
+ new Inner().bar();
+ }
+
+ class Inner {
+ }
+}
*/
public class Ajc1612Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+ public void testIllegalAccessError_343051() {
+ runTest("illegalaccesserror");
+ }
+
public void testItitNpe_339974() {
runTest("itit npe");
}
<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"/>