]> source.dussan.org Git - aspectj.git/commitdiff
338175: coping better with bad code
authoraclement <aclement>
Wed, 30 Mar 2011 19:08:32 +0000 (19:08 +0000)
committeraclement <aclement>
Wed, 30 Mar 2011 19:08:32 +0000 (19:08 +0000)
tests/bugs1612/pr338175/pack1/Aspect.java [new file with mode: 0644]
tests/bugs1612/pr338175/pack2/Java.java [new file with mode: 0644]
tests/bugs1612/pr338175/pack2/Java2.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/pr338175/pack1/Aspect.java b/tests/bugs1612/pr338175/pack1/Aspect.java
new file mode 100644 (file)
index 0000000..6e042ee
--- /dev/null
@@ -0,0 +1,10 @@
+package pack1;
+import pack2.Java;
+import pack2.Java2;
+public aspect Aspect {
+  public static final class Java.ITIT {
+    public static final java.util.List<String> X = null;    
+    public static final int X() { return 9; }  }  
+  public static final class Java2.ITIT {
+    public static final java.util.List<String> X2 = null;   
+    public static final int X2() { return 9; }  }}
diff --git a/tests/bugs1612/pr338175/pack2/Java.java b/tests/bugs1612/pr338175/pack2/Java.java
new file mode 100644 (file)
index 0000000..c32e970
--- /dev/null
@@ -0,0 +1,2 @@
+package pack2;
+public class Java {}
diff --git a/tests/bugs1612/pr338175/pack2/Java2.java b/tests/bugs1612/pr338175/pack2/Java2.java
new file mode 100644 (file)
index 0000000..41ef75c
--- /dev/null
@@ -0,0 +1,2 @@
+package pack2;
+public class Java2 {}
index 55aa6d3bb3a3505d6e144db2e6f575c83b0f6a39..5af06a3cd67934bebf719b496ba400941055f545 100644 (file)
@@ -21,6 +21,10 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
  */
 public class Ajc1612Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
 
+       public void testITIT_338175() {
+               runTest("itit");
+       }
+
        public void testThrowsClause_292239() {
                runTest("throws clause");
        }
index 943b4f28a16bacc24660c669f568d114e6df0b9d..f32b5497e44bbfaa1758a01940dcb3d329b9d5d9 100644 (file)
@@ -2,6 +2,13 @@
 
 <suite>
 
+<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"/>
+       <message kind="error" text="can't determine modifiers"/>
+</compile>
+</ajc-test>
+
   <ajc-test dir="bugs1612/pr292239" title="throws clause">
        <compile files="Code.java" options="-1.5 -showWeaveInfo">
          <message kind="weave" text="Join point 'method-execution(void mypackage.Code.n())' in Type 'mypackage.Code' (Code.java:19) advised by afterThrowing advice from 'mypackage.Azpect' (Code.java:9)"/>