From: aclement Date: Tue, 12 May 2009 17:47:06 +0000 (+0000) Subject: 275625: test and fix: declare at method X-Git-Tag: V1_6_5~43 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d45f7abd3a340ac6839dbb185cc3605c7e240481;p=aspectj.git 275625: test and fix: declare at method --- diff --git a/tests/bugs165/pr275625/A.java b/tests/bugs165/pr275625/A.java new file mode 100644 index 000000000..8b4226871 --- /dev/null +++ b/tests/bugs165/pr275625/A.java @@ -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 index 000000000..e881404e4 --- /dev/null +++ b/tests/bugs165/pr275625/F.java @@ -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 {}