]> source.dussan.org Git - aspectj.git/commitdiff
itd inners - fixed: needed a reference or wouldn't create the attribute.
authoraclement <aclement>
Mon, 6 Dec 2010 19:52:49 +0000 (19:52 +0000)
committeraclement <aclement>
Mon, 6 Dec 2010 19:52:49 +0000 (19:52 +0000)
tests/features169/itdInnerTypes/separate2/Basic.java [new file with mode: 0644]
tests/features169/itdInnerTypes/separate2/Basic2.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc169/IntertypeTests.java
tests/src/org/aspectj/systemtest/ajc169/intertype.xml

diff --git a/tests/features169/itdInnerTypes/separate2/Basic.java b/tests/features169/itdInnerTypes/separate2/Basic.java
new file mode 100644 (file)
index 0000000..44aed7c
--- /dev/null
@@ -0,0 +1,11 @@
+public class Basic {
+  public static void main(String []argv) {
+    // new _();
+    System.out.println("done");
+  }
+}
+
+aspect XX {
+  public static class Basic._ {
+  }
+}
diff --git a/tests/features169/itdInnerTypes/separate2/Basic2.java b/tests/features169/itdInnerTypes/separate2/Basic2.java
new file mode 100644 (file)
index 0000000..f44b45b
--- /dev/null
@@ -0,0 +1,6 @@
+public class Basic2 {
+  public static void main(String []argv) {
+    new Basic._();
+    System.out.println("done");
+  }
+}
index 6719b16ba790b80ec7e93646b951265e5aa3b4bd..d18fe1320ebf96d468003f41dee5109a5a6966a2 100644 (file)
@@ -60,6 +60,14 @@ public class IntertypeTests extends org.aspectj.testing.XMLBasedAjcTestCase {
                runTest("separate compilation");
        }
 
+       /**
+        * Interestingly this test makes no reference in the type Basic to the new ITD'd inner type, this causes the Basic type to be
+        * missing the innertype attribute!
+        */
+       public void testSeparateCompilation2() throws Exception {
+               runTest("separate compilation - 2");
+       }
+
        public void testErrorTargettingTypeThatAlreadyHasIt() {
                runTest("already has it");
        }
index de6854fafdd60cf6e4abbacad26f02a54f3e0b3b..063bee514177bc5d8ee9fd4fef57860778876f29 100644 (file)
        </stdout>
      </run>
    </ajc-test>
+   
+    <ajc-test dir="features169/itdInnerTypes/separate2" title="separate compilation - 2">
+     <compile files="Basic.java" options="-1.5"/>
+     <compile files="Basic2.java"/>
+     <run class="Basic2">
+       <stdout>
+       <line text="done"/>
+       </stdout>
+     </run>
+   </ajc-test>
 
    <ajc-test dir="features169/itdInnerTypes/eleven" title="already has it">
      <compile files="Target.java Aspect1.java" options="-1.5">