]> source.dussan.org Git - aspectj.git/commitdiff
tests for pr104024, inner class constructed inline and passed as argument to varargs...
authoracolyer <acolyer>
Wed, 31 Aug 2005 14:15:45 +0000 (14:15 +0000)
committeracolyer <acolyer>
Wed, 31 Aug 2005 14:15:45 +0000 (14:15 +0000)
tests/.classpath
tests/bugs150/pr104024.aj [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
tests/src/org/aspectj/systemtest/ajc150/tests/.cvsignore [new file with mode: 0644]
tests/src/org/aspectj/systemtest/tests/.cvsignore [new file with mode: 0644]

index 92e29f3bb56c8d58d914bcc49f462a9d751219cc..042f58fb37b24431f5b51f4e6eb8c5e2eabc1036 100644 (file)
@@ -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 (file)
index 0000000..98ac764
--- /dev/null
@@ -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
index d19ff4146bcced154cde059dc87c0ddae2930997..21ee9ab7af4fa4f34e54cab36ed58c80288ea223 100644 (file)
@@ -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) {
index cd05ccac50eb645c4c4882935f37ca666574ad00..acd56fa82caf630c0ca49887a3e73e885671c06a 100644 (file)
     <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 (file)
index 0000000..9d3c17f
--- /dev/null
@@ -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 (file)
index 0000000..9d3c17f
--- /dev/null
@@ -0,0 +1 @@
+ajcTestSuite.dtd