From d45f7abd3a340ac6839dbb185cc3605c7e240481 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 12 May 2009 17:47:06 +0000 Subject: [PATCH] 275625: test and fix: declare at method --- tests/bugs165/pr275625/A.java | 22 ++++++++++++++++++++++ tests/bugs165/pr275625/F.java | 22 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 tests/bugs165/pr275625/A.java create mode 100644 tests/bugs165/pr275625/F.java 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 {} -- 2.39.5