From f2af562611c7e060ebd71b9b29d6766ffcb9c727 Mon Sep 17 00:00:00 2001 From: acolyer Date: Wed, 31 Aug 2005 14:15:45 +0000 Subject: [PATCH] tests for pr104024, inner class constructed inline and passed as argument to varargs method --- tests/.classpath | 2 +- tests/bugs150/pr104024.aj | 14 ++++++++++++++ .../org/aspectj/systemtest/ajc150/Ajc150Tests.java | 4 ++++ tests/src/org/aspectj/systemtest/ajc150/ajc150.xml | 5 +++++ .../org/aspectj/systemtest/ajc150/tests/.cvsignore | 1 + tests/src/org/aspectj/systemtest/tests/.cvsignore | 1 + 6 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 tests/bugs150/pr104024.aj create mode 100644 tests/src/org/aspectj/systemtest/ajc150/tests/.cvsignore create mode 100644 tests/src/org/aspectj/systemtest/tests/.cvsignore diff --git a/tests/.classpath b/tests/.classpath index 92e29f3bb..042f58fb3 100644 --- a/tests/.classpath +++ b/tests/.classpath @@ -10,9 +10,9 @@ - + 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 @@ + + + + + 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 -- 2.39.5