]> source.dussan.org Git - aspectj.git/commitdiff
275625: test and fix: declare at method
authoraclement <aclement>
Tue, 12 May 2009 17:47:06 +0000 (17:47 +0000)
committeraclement <aclement>
Tue, 12 May 2009 17:47:06 +0000 (17:47 +0000)
tests/bugs165/pr275625/A.java [new file with mode: 0644]
tests/bugs165/pr275625/F.java [new file with mode: 0644]

diff --git a/tests/bugs165/pr275625/A.java b/tests/bugs165/pr275625/A.java
new file mode 100644 (file)
index 0000000..8b42268
--- /dev/null
@@ -0,0 +1,22 @@
+import java.lang.annotation.*;
+
+public class A {
+  public void m() {}
+
+  public static void main(String []argv) {
+  }
+
+}
+
+aspect X {
+  declare @method: @J * A.m(): @I;
+  declare @method: * A.m(): @K;
+  declare @method: @K * A.m(): @J;
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface I {}
+@Retention(RetentionPolicy.RUNTIME)
+@interface J {}
+@Retention(RetentionPolicy.RUNTIME)
+@interface K {}
diff --git a/tests/bugs165/pr275625/F.java b/tests/bugs165/pr275625/F.java
new file mode 100644 (file)
index 0000000..e881404
--- /dev/null
@@ -0,0 +1,22 @@
+import java.lang.annotation.*;
+
+public class F {
+  int f;
+
+  public static void main(String []argv) {
+  }
+
+}
+
+aspect X {
+  declare @field: @J * F.f: @I;
+  declare @field: * F.f: @K;
+  declare @field: @K * F.f: @J;
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface I {}
+@Retention(RetentionPolicy.RUNTIME)
+@interface J {}
+@Retention(RetentionPolicy.RUNTIME)
+@interface K {}