From 5c4b5d1fec3fa38d33d3e079b0c6645cc136552e Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 18 Jun 2008 17:18:52 +0000 Subject: [PATCH] 237447: test and fix: nested parameterization --- tests/bugs161/pr237447/GenericClass.java | 3 +++ .../pr237447/GenericGenericMemberClass.java | 16 ++++++++++++++++ tests/bugs161/pr237447/SomeClass.java | 9 +++++++++ tests/bugs161/pr237447/UnrelatedAspect.java | 7 +++++++ .../aspectj/systemtest/ajc161/Ajc161Tests.java | 5 +---- .../src/org/aspectj/systemtest/ajc161/ajc161.xml | 5 +++++ 6 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 tests/bugs161/pr237447/GenericClass.java create mode 100644 tests/bugs161/pr237447/GenericGenericMemberClass.java create mode 100644 tests/bugs161/pr237447/SomeClass.java create mode 100644 tests/bugs161/pr237447/UnrelatedAspect.java diff --git a/tests/bugs161/pr237447/GenericClass.java b/tests/bugs161/pr237447/GenericClass.java new file mode 100644 index 000000000..a6318e353 --- /dev/null +++ b/tests/bugs161/pr237447/GenericClass.java @@ -0,0 +1,3 @@ +public class GenericClass { +} + diff --git a/tests/bugs161/pr237447/GenericGenericMemberClass.java b/tests/bugs161/pr237447/GenericGenericMemberClass.java new file mode 100644 index 000000000..65f864d45 --- /dev/null +++ b/tests/bugs161/pr237447/GenericGenericMemberClass.java @@ -0,0 +1,16 @@ +public class GenericGenericMemberClass { + + // this line never causes a problem + GenericClass [] genericMemberArray; + + // this line causes compilation errors to be introduced + GenericClass< GenericClass >[] genericGenericMemberArray; + + // uncommenting the following lines removes the compilation errors (very unexpectedly, for me at least) +// @SuppressWarnings("unused") +// private static final GenericClass< GenericClass > genericGenericMember = null; + + public void test() { + } +} + diff --git a/tests/bugs161/pr237447/SomeClass.java b/tests/bugs161/pr237447/SomeClass.java new file mode 100644 index 000000000..6837aa840 --- /dev/null +++ b/tests/bugs161/pr237447/SomeClass.java @@ -0,0 +1,9 @@ +public class SomeClass { + GenericGenericMemberClass member; + + public void someMethod() { + // commenting the following line will remove compilation errors (and mask the problem) + member.test(); + } +} + diff --git a/tests/bugs161/pr237447/UnrelatedAspect.java b/tests/bugs161/pr237447/UnrelatedAspect.java new file mode 100644 index 000000000..c378480b4 --- /dev/null +++ b/tests/bugs161/pr237447/UnrelatedAspect.java @@ -0,0 +1,7 @@ +import org.aspectj.lang.annotation.*; + +@SuppressAjWarnings +public aspect UnrelatedAspect { + before(): call(void UnrelatedClas*.unrelatedMethod()) { + } +} \ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java b/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java index 413beb85e..1a6e4e128 100644 --- a/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java @@ -16,19 +16,16 @@ import java.util.Set; import junit.framework.Test; -import org.aspectj.apache.bcel.classfile.JavaClass; import org.aspectj.apache.bcel.classfile.LocalVariable; import org.aspectj.apache.bcel.classfile.LocalVariableTable; -import org.aspectj.apache.bcel.classfile.Method; import org.aspectj.asm.AsmManager; import org.aspectj.asm.IRelationshipMap; -import org.aspectj.testing.Utils; import org.aspectj.testing.XMLBasedAjcTestCase; -import org.aspectj.tools.ajc.Ajc; public class Ajc161Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // AspectJ1.6.1 + public void testSignatureProcessing_pr237447() { runTest("signature processing"); } public void testGenericAtAround_pr237419() { runTest("generics ataround"); } public void testGenericMarkerMatch_pr203367() { runTest("generic marker match"); } // public void testSuperItds_pr134425() { runTest("super itds"); } diff --git a/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml b/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml index 3f611cc5b..b28941e6a 100644 --- a/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml +++ b/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml @@ -3,6 +3,11 @@ + + + + + -- 2.39.5