diff options
author | aclement <aclement> | 2005-06-02 11:09:21 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-06-02 11:09:21 +0000 |
commit | 8459fa6a55bb37e629b1c4e7b610f016f499f51a (patch) | |
tree | 9d8e601fea4d23f08411f67762e92a84ad041378 /tests/java5/generics/decp | |
parent | 19890f1a69e97fd5defa731b596e70f65eaf441e (diff) | |
download | aspectj-8459fa6a55bb37e629b1c4e7b610f016f499f51a.tar.gz aspectj-8459fa6a55bb37e629b1c4e7b610f016f499f51a.zip |
GenericsWork: ITD testcode
Diffstat (limited to 'tests/java5/generics/decp')
-rw-r--r-- | tests/java5/generics/decp/Basic.aj | 13 | ||||
-rw-r--r-- | tests/java5/generics/decp/Basic2.aj | 12 |
2 files changed, 25 insertions, 0 deletions
diff --git a/tests/java5/generics/decp/Basic.aj b/tests/java5/generics/decp/Basic.aj new file mode 100644 index 000000000..dee3872e6 --- /dev/null +++ b/tests/java5/generics/decp/Basic.aj @@ -0,0 +1,13 @@ +interface I<T>{ } + +public class Basic{ + + public static void main(String[]argv) { + Basic b = new Basic(); + if (b instanceof I) throw new RuntimeException("Should implement I??"); + } +} + +aspect X{ + declare parents: Basic implements I<String>; +} diff --git a/tests/java5/generics/decp/Basic2.aj b/tests/java5/generics/decp/Basic2.aj new file mode 100644 index 000000000..d1127d1ed --- /dev/null +++ b/tests/java5/generics/decp/Basic2.aj @@ -0,0 +1,12 @@ +// error, can't implement two variants of a generic type +interface I<T>{ } + +public class Basic implements I<String> { + + public static void main(String[]argv) { + } +} + +aspect X{ + declare parents: Basic implements I<Integer>; // error +} |