aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-08-17 08:36:47 +0000
committeracolyer <acolyer>2005-08-17 08:36:47 +0000
commitc75040720d62262539d37af46339d6e3a6a89c3f (patch)
tree8991a3e5630024e0434ce051c0d103561a9a4866 /tests
parent0f181ac687428a9aec2b711609516292f76e28b1 (diff)
downloadaspectj-c75040720d62262539d37af46339d6e3a6a89c3f.tar.gz
aspectj-c75040720d62262539d37af46339d6e3a6a89c3f.zip
test case for user list reported problem with annotations on an intermediate type in a hierarchy
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs150/AnnotationPlusPatternMatchingError.aj33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/bugs150/AnnotationPlusPatternMatchingError.aj b/tests/bugs150/AnnotationPlusPatternMatchingError.aj
new file mode 100644
index 000000000..5be1ad416
--- /dev/null
+++ b/tests/bugs150/AnnotationPlusPatternMatchingError.aj
@@ -0,0 +1,33 @@
+interface A {
+public void a(String s);
+}
+
+@Annotation
+interface B extends A{}
+
+class C implements B {
+ public void a(final String s) {}
+}
+
+aspect Aspect{
+ pointcut foo(): call(* (@Annotation *)+.*(..));
+ declare warning : foo() : "matched";
+ before() : foo() {
+ System.out.println("In advice");
+ }
+}
+
+public class AnnotationPlusPatternMatchingError {
+
+ public static void main(String[] args) {
+ new AnnotationPlusPatternMatchingError().testLtw();
+ }
+
+ public void testLtw() {
+ B anA = new C();
+ anA.a("hi");
+ }
+
+}
+
+@interface Annotation {} \ No newline at end of file