From 9d1a56b3e8a0ffd055986e08612e3baf30efc25f Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 21 Sep 2006 13:03:02 +0000 Subject: test code for 158126 - already fixed ;) just a nice test to have --- tests/bugs153/pr158126/A.java | 17 +++++++++++++++++ tests/bugs153/pr158126/B.java | 12 ++++++++++++ tests/bugs153/pr158126/MyAnnotation.java | 7 +++++++ tests/bugs153/pr158126/MyAspect.java | 7 +++++++ 4 files changed, 43 insertions(+) create mode 100644 tests/bugs153/pr158126/A.java create mode 100644 tests/bugs153/pr158126/B.java create mode 100644 tests/bugs153/pr158126/MyAnnotation.java create mode 100644 tests/bugs153/pr158126/MyAspect.java (limited to 'tests/bugs153') diff --git a/tests/bugs153/pr158126/A.java b/tests/bugs153/pr158126/A.java new file mode 100644 index 000000000..d92c77fcb --- /dev/null +++ b/tests/bugs153/pr158126/A.java @@ -0,0 +1,17 @@ +public class A { + + @MyAnnotation + public A() { + new B(); + } + + @MyAnnotation + public A(int i) { + new B(i); + } + + public static void main(String[] args) { + new A(); + new A(1); + } +} diff --git a/tests/bugs153/pr158126/B.java b/tests/bugs153/pr158126/B.java new file mode 100644 index 000000000..bdbfa788d --- /dev/null +++ b/tests/bugs153/pr158126/B.java @@ -0,0 +1,12 @@ +public class B { + + @MyAnnotation + public B() { + + } + + @MyAnnotation + public B(int i) { + + } +} diff --git a/tests/bugs153/pr158126/MyAnnotation.java b/tests/bugs153/pr158126/MyAnnotation.java new file mode 100644 index 000000000..33d13ead8 --- /dev/null +++ b/tests/bugs153/pr158126/MyAnnotation.java @@ -0,0 +1,7 @@ +import java.lang.annotation.*; + +@Target(ElementType.CONSTRUCTOR) +@Retention(RetentionPolicy.RUNTIME) +public @interface MyAnnotation { + +} diff --git a/tests/bugs153/pr158126/MyAspect.java b/tests/bugs153/pr158126/MyAspect.java new file mode 100644 index 000000000..0ab4a323e --- /dev/null +++ b/tests/bugs153/pr158126/MyAspect.java @@ -0,0 +1,7 @@ +public aspect MyAspect { + + before() : + call(@MyAnnotation *.new(..)) { + System.out.println(thisJoinPoint); + } +} -- cgit v1.2.3