diff options
author | aclement <aclement> | 2006-01-23 10:47:29 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-01-23 10:47:29 +0000 |
commit | 8676df9bca4e5e169206f314c8ad5d3da38bc28e (patch) | |
tree | 7469cd7640ddc92294773d2aba941e2c0adb85bf /tests/bugs151 | |
parent | b537e726b3ab16bf30f972e87d768aba0eba31c7 (diff) | |
download | aspectj-8676df9bca4e5e169206f314c8ad5d3da38bc28e.tar.gz aspectj-8676df9bca4e5e169206f314c8ad5d3da38bc28e.zip |
test and fix for pr124803 - mixing numbers of tvars/tparams in a hierarchy
Diffstat (limited to 'tests/bugs151')
-rw-r--r-- | tests/bugs151/pr124803/Test.java | 19 | ||||
-rw-r--r-- | tests/bugs151/pr124803/Test2.java | 19 | ||||
-rw-r--r-- | tests/bugs151/pr124803/TestAspect.java | 8 | ||||
-rw-r--r-- | tests/bugs151/pr124803/TestAspect2.java | 8 |
4 files changed, 54 insertions, 0 deletions
diff --git a/tests/bugs151/pr124803/Test.java b/tests/bugs151/pr124803/Test.java new file mode 100644 index 000000000..5c4784cac --- /dev/null +++ b/tests/bugs151/pr124803/Test.java @@ -0,0 +1,19 @@ +interface Generic1<T extends Number> { + public void foo(T p); +} + + +interface Generic2<T extends Number, Y extends Number> extends Generic1<T> { + public void foo2(Y p); +} + +public class Test<Y extends Number> implements Generic2<Y,Y>{ + public void foo2(Y p) { } + public void foo(Y p) { } + + public static void main(String []argv) { + Test<Integer> t = new Test<Integer>(); + t.foo(7); + t.foo2(9); + } +} diff --git a/tests/bugs151/pr124803/Test2.java b/tests/bugs151/pr124803/Test2.java new file mode 100644 index 000000000..58a364573 --- /dev/null +++ b/tests/bugs151/pr124803/Test2.java @@ -0,0 +1,19 @@ +class Generic1<T extends Number> { + public void foo(T p) { } +} + + +class Generic2<T extends Number, Y extends Number> extends Generic1<T> { + public void foo2(Y p) {} +} + +public class Test2<Y extends Number> extends Generic2<Y,Y>{ + public void foo2(Y p) { } + public void foo(Y p) { } + + public static void main(String []argv) { + Test2<Integer> t = new Test2<Integer>(); + t.foo(7); + t.foo2(9); + } +} diff --git a/tests/bugs151/pr124803/TestAspect.java b/tests/bugs151/pr124803/TestAspect.java new file mode 100644 index 000000000..c22b8f966 --- /dev/null +++ b/tests/bugs151/pr124803/TestAspect.java @@ -0,0 +1,8 @@ +public privileged aspect TestAspect { + pointcut TestInheritance(Test test) : target(test) && execution (* Generic1.*(..)); + + after (Test test) : TestInheritance(test) { + System.err.println("Aspects:"+thisJoinPoint); + } +} + diff --git a/tests/bugs151/pr124803/TestAspect2.java b/tests/bugs151/pr124803/TestAspect2.java new file mode 100644 index 000000000..62d7ab513 --- /dev/null +++ b/tests/bugs151/pr124803/TestAspect2.java @@ -0,0 +1,8 @@ +public privileged aspect TestAspect2 { + pointcut TestInheritance(Test2 test) : target(test) && execution (* Generic1.*(..)); + + after (Test2 test) : TestInheritance(test) { + System.err.println("Aspects:"+thisJoinPoint); + } +} + |