From 8459fa6a55bb37e629b1c4e7b610f016f499f51a Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 2 Jun 2005 11:09:21 +0000 Subject: GenericsWork: ITD testcode --- tests/java5/generics/decp/Basic.aj | 13 +++++++++++++ tests/java5/generics/decp/Basic2.aj | 12 ++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 tests/java5/generics/decp/Basic.aj create mode 100644 tests/java5/generics/decp/Basic2.aj (limited to 'tests/java5/generics/decp') 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{ } + +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; +} 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{ } + +public class Basic implements I { + + public static void main(String[]argv) { + } +} + +aspect X{ + declare parents: Basic implements I; // error +} -- cgit v1.2.3