aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs187/474165/B.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs187/474165/B.java')
-rw-r--r--tests/bugs187/474165/B.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/bugs187/474165/B.java b/tests/bugs187/474165/B.java
new file mode 100644
index 000000000..7b1bb1950
--- /dev/null
+++ b/tests/bugs187/474165/B.java
@@ -0,0 +1,20 @@
+// HasMethod with anno value matching
+
+@interface I {
+ Class i();
+}
+aspect A {
+ declare parents: hasmethod(@I(i=String.class) * *(..)) implements java.io.Serializable;
+}
+
+public class B {
+@I(i=String.class) public void m() {}
+ public static void main(String []argv) {
+ B b = new B();
+ if (!(b instanceof java.io.Serializable)) throw new IllegalStateException("");
+ }
+}
+class C {
+@I(i=Integer.class) public void m() {}
+}
+