]> source.dussan.org Git - aspectj.git/commitdiff
342323
authoraclement <aclement>
Fri, 8 Apr 2011 23:19:42 +0000 (23:19 +0000)
committeraclement <aclement>
Fri, 8 Apr 2011 23:19:42 +0000 (23:19 +0000)
tests/bugs1612/pr342323/Azpect.java [new file with mode: 0644]
tests/bugs1612/pr342323/Bean.java [new file with mode: 0644]
tests/bugs1612/pr342323/Runner.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/pr342323/Azpect.java b/tests/bugs1612/pr342323/Azpect.java
new file mode 100644 (file)
index 0000000..e618f31
--- /dev/null
@@ -0,0 +1,12 @@
+package ppp;
+privileged aspect Azpect {
+  public void Bean.foo() {
+         Runnable r = new Runnable() {
+                   public void run() {
+                       System.out.println("aspect foo");
+                   }
+         };
+         r.run();
+  }
+}
+
diff --git a/tests/bugs1612/pr342323/Bean.java b/tests/bugs1612/pr342323/Bean.java
new file mode 100644 (file)
index 0000000..d1ab957
--- /dev/null
@@ -0,0 +1,11 @@
+package ppp;
+public class Bean {
+  public void m() {
+    Runnable r = new Runnable() { public void run() { System.out.println("class");}};
+    r.run();
+  }
+  public void n() {
+    Runnable r = new Runnable() { public void run() { System.out.println("class");}};
+    r.run();
+  }
+}
diff --git a/tests/bugs1612/pr342323/Runner.java b/tests/bugs1612/pr342323/Runner.java
new file mode 100644 (file)
index 0000000..71a2b97
--- /dev/null
@@ -0,0 +1,14 @@
+package ppp;
+public class Runner {
+  public static void main(String[] argv) {
+    new Runner().run();
+  }
+
+  public void run() {
+   Bean c = new Bean();
+    System.out.println("Calling regular method");
+    c.m();
+    System.out.println("Calling itd method");
+    c.foo();
+  }
+}
index 5af06a3cd67934bebf719b496ba400941055f545..3a1156f42f58971a785bf6ec0a0d71d6c069761c 100644 (file)
@@ -21,6 +21,10 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
  */
 public class Ajc1612Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
 
+       public void testClashingLocalTypes_342323() {
+               runTest("clashing local types");
+       }
+
        public void testITIT_338175() {
                runTest("itit");
        }
index f32b5497e44bbfaa1758a01940dcb3d329b9d5d9..d8895fecc6a6e348873e202fa513f680400a6c2c 100644 (file)
@@ -2,6 +2,19 @@
 
 <suite>
 
+
+  <ajc-test dir="bugs1612/pr342323" title="clashing local types">
+       <compile files="Runner.java Bean.java Azpect.java" options="-1.5"/>
+       <run class="ppp.Runner">
+       <stdout>
+               <line text="Calling regular method"/>
+               <line text="class"/>
+               <line text="Calling itd method"/>
+               <line text="aspect foo"/>
+       </stdout>
+       </run>
+  </ajc-test>
+
 <ajc-test dir="bugs1612/pr338175" title="itit">
 <compile files="pack1/Aspect.java pack2/Java.java pack2/Java2.java" options="-1.5">
        <message kind="error" text="Duplicate nested type ITIT"/>