diff options
author | aclement <aclement> | 2008-06-05 20:46:00 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-06-05 20:46:00 +0000 |
commit | 185d841fb8b93ff3a91dc032d9ee1ad8c0b8a60f (patch) | |
tree | d1565aa5538f404c1ca59d4d1988c92af732ee5e | |
parent | e4dfc7aa94216cea4f9f15608b21c25c95570b0d (diff) | |
download | aspectj-185d841fb8b93ff3a91dc032d9ee1ad8c0b8a60f.tar.gz aspectj-185d841fb8b93ff3a91dc032d9ee1ad8c0b8a60f.zip |
235829: test and fix: generic sigs and inner classes
-rw-r--r-- | tests/bugs161/pr235829/Main.java | 13 | ||||
-rw-r--r-- | tests/bugs161/pr235829/a/Adapter.java | 7 | ||||
-rw-r--r-- | tests/bugs161/pr235829/a/b/Adapter.java | 9 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java | 1 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc161/ajc161.xml | 6 |
5 files changed, 36 insertions, 0 deletions
diff --git a/tests/bugs161/pr235829/Main.java b/tests/bugs161/pr235829/Main.java new file mode 100644 index 000000000..6072ec53d --- /dev/null +++ b/tests/bugs161/pr235829/Main.java @@ -0,0 +1,13 @@ +import java.lang.reflect.Type; + +public class Main { + + public static void main(String[]argv) throws Exception { + Class c = Class.forName("a.b.Adapter$1"); + Type[] ts = c.getGenericInterfaces(); + for (int i = 0; i < ts.length; i++) { + Type type = ts[i]; + System.out.println(ts[i]); + } + } +}
\ No newline at end of file diff --git a/tests/bugs161/pr235829/a/Adapter.java b/tests/bugs161/pr235829/a/Adapter.java new file mode 100644 index 000000000..53dd91eb1 --- /dev/null +++ b/tests/bugs161/pr235829/a/Adapter.java @@ -0,0 +1,7 @@ +package a; + +public interface Adapter<T> { + interface Setter<V> {} + + public <V> Setter<V> makeSetter(); +} diff --git a/tests/bugs161/pr235829/a/b/Adapter.java b/tests/bugs161/pr235829/a/b/Adapter.java new file mode 100644 index 000000000..69d0d79c8 --- /dev/null +++ b/tests/bugs161/pr235829/a/b/Adapter.java @@ -0,0 +1,9 @@ +package a.b; + +public class Adapter<T> implements a.Adapter<T> { + + public <V> Adapter.Setter<V> makeSetter() { + return new Adapter.Setter<V>() {}; + } + +} diff --git a/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java b/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java index 7aebc4b7b..c138dc1b4 100644 --- a/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java @@ -23,6 +23,7 @@ import org.aspectj.testing.XMLBasedAjcTestCase; public class Ajc161Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // AspectJ1.6.1 + public void testCrazyGenericsInnerTypes_pr235829() { runTest("crazy generics and inner types");} public void testAnnotationExposureGenerics_pr235597() { runTest("annotation exposure and generics");} public void testIncorrectRelationship_pr235204() { runTest("incorrect call relationship"); diff --git a/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml b/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml index 7c87c3f24..792560cff 100644 --- a/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml +++ b/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml @@ -3,6 +3,12 @@ <!-- AspectJ v1.6.1 Tests --> <suite> + <ajc-test dir="bugs161/pr235829" title="crazy generics and inner types"> + <compile files="Main.java a/Adapter.java a/b/Adapter.java" options="-1.5"/> + <run class="Main"/> + </ajc-test> + + <ajc-test dir="bugs161/pr235597" title="annotation exposure and generics"> <compile files="AnnotationTest1.java SomeAnnotation.java SomeAspect.java" options="-1.5"/> <run class="AnnotationTest1"> |