aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2008-03-11 16:08:44 +0000
committeraclement <aclement>2008-03-11 16:08:44 +0000
commit3a64e7efe65ed2e50969a0270e124e822c742eee (patch)
treeb4fb6e8bf57ad36c70fe823277f29942dec3b6bb
parenta31b3dea01cbf925e6b22ef8789b3a3d86fd9160 (diff)
downloadaspectj-3a64e7efe65ed2e50969a0270e124e822c742eee.tar.gz
aspectj-3a64e7efe65ed2e50969a0270e124e822c742eee.zip
201748: new testcase, currently commented out
-rw-r--r--tests/bugs160/pr201748/Foo.java18
-rw-r--r--tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java1
-rw-r--r--tests/src/org/aspectj/systemtest/ajc160/ajc160.xml6
3 files changed, 25 insertions, 0 deletions
diff --git a/tests/bugs160/pr201748/Foo.java b/tests/bugs160/pr201748/Foo.java
new file mode 100644
index 000000000..8faf23eaf
--- /dev/null
+++ b/tests/bugs160/pr201748/Foo.java
@@ -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
diff --git a/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java b/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java
index 29fd87422..3b4837c81 100644
--- a/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java
@@ -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");}
diff --git a/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml b/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml
index bfc1c4c46..bf539f57b 100644
--- a/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml
+++ b/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml
@@ -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()')"/>