Browse Source

test case for user list reported problem with annotations on an intermediate type in a hierarchy

tags/V1_5_0M3
acolyer 19 years ago
parent
commit
c75040720d
1 changed files with 33 additions and 0 deletions
  1. 33
    0
      tests/bugs150/AnnotationPlusPatternMatchingError.aj

+ 33
- 0
tests/bugs150/AnnotationPlusPatternMatchingError.aj View File

@@ -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 {}

Loading…
Cancel
Save