From 76097cb5054c43c7f1f5ea28aa3183d71eba2573 Mon Sep 17 00:00:00 2001 From: aclement Date: Mon, 10 Jul 2006 14:54:08 +0000 Subject: [PATCH] testcode for 150095: generics binary decp --- tests/bugs153/pr150095/Foo.java | 28 +++++++++++++++++++ .../systemtest/ajc153/Ajc153Tests.java | 1 + .../org/aspectj/systemtest/ajc153/ajc153.xml | 4 +++ 3 files changed, 33 insertions(+) create mode 100644 tests/bugs153/pr150095/Foo.java diff --git a/tests/bugs153/pr150095/Foo.java b/tests/bugs153/pr150095/Foo.java new file mode 100644 index 000000000..a0c14f73b --- /dev/null +++ b/tests/bugs153/pr150095/Foo.java @@ -0,0 +1,28 @@ +import java.util.*; + +interface I extends Collection { } + +class B implements I { + + public Object[] toArray(Object[] os) { return os; } + + public boolean add(Object o) { return false; } + public boolean addAll(Collection c) { return false; } + public void clear() { } + public boolean contains(Object o) { return false; } + public boolean containsAll(Collection c) { return false; } + public boolean isEmpty() { return false; } + public Iterator iterator() { return null; } + public boolean remove(Object o) { return false; } + public boolean removeAll(Collection c) { return false; } + public boolean retainAll(Collection c) { return false; } + public int size() { return 0; } + public Object[] toArray() { return null; } +} + +class C { } + +aspect X { + declare parents: C extends B; +} + diff --git a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java index 0bd75f3d7..ead8d9d77 100644 --- a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java @@ -21,6 +21,7 @@ public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // public void testArgnamesAndJavac_pr148381() { runTest("argNames and javac");} // public void testCFlowXMLAspectLTW_pr149096() { runTest("cflow xml concrete aspect"); } + public void testGenericInheritanceDecp_pr150095() { runTest("generics, inheritance and decp");} public void testIllegalStateException_pr148737() { runTest("illegalstateexception for non generic type");} public void testAtajInheritance_pr149305_1() { runTest("ataj inheritance - 1");} public void testAtajInheritance_pr149305_2() { runTest("ataj inheritance - 2");} diff --git a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml index c55cc6bb2..42657d656 100644 --- a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml +++ b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml @@ -107,6 +107,10 @@ + + + +