aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-08-31 14:15:45 +0000
committeracolyer <acolyer>2005-08-31 14:15:45 +0000
commitf2af562611c7e060ebd71b9b29d6766ffcb9c727 (patch)
treea7bad3a4d1e826b17ded5752292c06240ee6e845 /tests
parenta0ab747e10653a76abf8ddf839fa6b830e65acb1 (diff)
downloadaspectj-f2af562611c7e060ebd71b9b29d6766ffcb9c727.tar.gz
aspectj-f2af562611c7e060ebd71b9b29d6766ffcb9c727.zip
tests for pr104024, inner class constructed inline and passed as argument to varargs method
Diffstat (limited to 'tests')
-rw-r--r--tests/.classpath2
-rw-r--r--tests/bugs150/pr104024.aj14
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java4
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/ajc150.xml5
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/tests/.cvsignore1
-rw-r--r--tests/src/org/aspectj/systemtest/tests/.cvsignore1
6 files changed, 26 insertions, 1 deletions
diff --git a/tests/.classpath b/tests/.classpath
index 92e29f3bb..042f58fb3 100644
--- a/tests/.classpath
+++ b/tests/.classpath
@@ -10,9 +10,9 @@
<classpathentry kind="src" path="/bridge"/>
<classpathentry kind="src" path="/ajde"/>
<classpathentry kind="src" path="/asm"/>
- <classpathentry kind="var" path="JAVA_HOME/lib/tools.jar"/>
<classpathentry sourcepath="/lib/bcel/bcel-src.zip" kind="lib" path="/lib/bcel/bcel.jar"/>
<classpathentry kind="lib" path="/lib/ant/lib/ant-launcher.jar"/>
<classpathentry kind="src" path="testsrc"/>
+ <classpathentry kind="var" path="JAVA_HOME/lib/tools.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/tests/bugs150/pr104024.aj b/tests/bugs150/pr104024.aj
new file mode 100644
index 000000000..98ac76412
--- /dev/null
+++ b/tests/bugs150/pr104024.aj
@@ -0,0 +1,14 @@
+class Outer {
+ public class Inner {}
+}
+
+
+public class pr104024 {
+ public void varargs(Object... varargs) {}
+
+ public void test() {
+ Outer.Inner inner = new Outer().new Inner();
+ varargs(inner); // works
+ varargs(new Outer().new Inner()); // crashes
+ }
+} \ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
index d19ff4146..21ee9ab7a 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
@@ -326,6 +326,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
runTest("declare parents introducing override with covariance");
}
+ public void testInnerClassPassedToVarargs() {
+ runTest("inner class passed as argument to varargs method");
+ }
+
// helper methods.....
public SyntheticRepository createRepos(File cpentry) {
diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
index cd05ccac5..acd56fa82 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
+++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
@@ -385,6 +385,11 @@
<ajc-test dir="bugs150" pr="105479" title="declare parents introducing override with covariance">
<compile files="pr105479.aj" options="-1.5"/>
</ajc-test>
+
+ <ajc-test dir="bugs150" pr="104024" title="inner class passed as argument to varargs method">
+ <compile files="pr104024.aj" options="-1.5"/>
+ </ajc-test>
+
<!-- ============================================================================ -->
<!-- ============================================================================ -->
diff --git a/tests/src/org/aspectj/systemtest/ajc150/tests/.cvsignore b/tests/src/org/aspectj/systemtest/ajc150/tests/.cvsignore
new file mode 100644
index 000000000..9d3c17f8d
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/ajc150/tests/.cvsignore
@@ -0,0 +1 @@
+ajcTestSuite.dtd
diff --git a/tests/src/org/aspectj/systemtest/tests/.cvsignore b/tests/src/org/aspectj/systemtest/tests/.cvsignore
new file mode 100644
index 000000000..9d3c17f8d
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/tests/.cvsignore
@@ -0,0 +1 @@
+ajcTestSuite.dtd