From 20c4e096716f935fdcf8b5d42135a9b101480a82 Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 8 Nov 2007 08:58:21 +0000 Subject: more testcode for 169432 --- tests/bugs154/pr169432/case3/A.java | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tests/bugs154/pr169432/case3/A.java (limited to 'tests/bugs154/pr169432/case3') diff --git a/tests/bugs154/pr169432/case3/A.java b/tests/bugs154/pr169432/case3/A.java new file mode 100644 index 000000000..e5700a38c --- /dev/null +++ b/tests/bugs154/pr169432/case3/A.java @@ -0,0 +1,36 @@ + +// Now C1 and C2 implement the interface + +import org.aspectj.lang.annotation.*; + +public class A { + public static void main(String []argv) { + C1 c1 = new C1(); + System.out.println("C1.m() returns "+((NonMarkerInterface)c1).m()); + C2 c2 = new C2(); + System.out.println("C2.m() returns "+((NonMarkerInterface)c2).m()); + } +} + +@Aspect class X { + @DeclareParents(value="C*") + public NonMarkerInterface nmi; +} + +interface NonMarkerInterface { + public int m(); +} + +class Y implements NonMarkerInterface { + public Y() {} + public int m() { return 43;} +} + +class C1 { + public int m() { return 1;} + +} + +class C2 { + public int m() { return 2;} +} -- cgit v1.2.3