]> source.dussan.org Git - aspectj.git/commitdiff
201748: new testcase, currently commented out
authoraclement <aclement>
Tue, 11 Mar 2008 16:08:44 +0000 (16:08 +0000)
committeraclement <aclement>
Tue, 11 Mar 2008 16:08:44 +0000 (16:08 +0000)
tests/bugs160/pr201748/Foo.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java
tests/src/org/aspectj/systemtest/ajc160/ajc160.xml

diff --git a/tests/bugs160/pr201748/Foo.java b/tests/bugs160/pr201748/Foo.java
new file mode 100644 (file)
index 0000000..8faf23e
--- /dev/null
@@ -0,0 +1,18 @@
+aspect MA {
+  Factory AnyClass.myfactory = Factory.create();
+}
+
+class Factory {
+  public static Factory[] create() {
+    return null;
+  }
+}
+
+class AnyClass {
+}
+
+public class Foo {
+  public static void main(String []argv) {
+    new AnyClass();
+  }
+}
\ No newline at end of file
index 29fd87422599cd562cab92330f0ce39615dd1b6c..3b4837c8102551597f09a4284b80bf33bda6fac6 100644 (file)
@@ -21,6 +21,7 @@ import junit.framework.Test;
 public class Ajc160Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
        
        // AspectH1.6.0rc1
+       //public void testITDWithArray_pr201748() { runTest("itd with array");}
        public void testBadMessage() { runTest("incorrect itd error with generics");}
        public void testBadMessage2() { runTest("incorrect itd error with generics - 2");}
        public void testHasMethodAnnoValueInt_various() { runTest("hasmethod anno value - I");}
index bfc1c4c4671692d9f179548d777cf8f72256dd22..bf539f57bcef2ad460c520d02b8a8d9354142a41 100644 (file)
@@ -4,6 +4,12 @@
 <suite>
 
 
+       <ajc-test dir="bugs160/pr201748" title="itd with array">
+     <compile files="Foo.java">
+       <message kind="error" text="Type mismatch: cannot convert from Factory[] to Factory"/>
+     </compile>
+   </ajc-test>
+   
    <ajc-test dir="bugs160/various" title="incorrect itd error with generics">
      <compile options="-1.5 -showWeaveInfo" files="IncorrectMessage.java">
        <message kind="weave" text="Type 'Foo' (IncorrectMessage.java) has intertyped method from 'AspectDoWhatEver' (IncorrectMessage.java:'void Marker.doWhatEver()')"/>