diff options
Diffstat (limited to 'tests/bugs162')
-rw-r--r-- | tests/bugs162/pr176905/ChainedItd.aj | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/bugs162/pr176905/ChainedItd.aj b/tests/bugs162/pr176905/ChainedItd.aj new file mode 100644 index 000000000..441cf7057 --- /dev/null +++ b/tests/bugs162/pr176905/ChainedItd.aj @@ -0,0 +1,24 @@ +import java.lang.reflect.Field; +import java.lang.annotation.*; + +public aspect ChainedItd { + declare @field: long *.foo: @Deprecated; + + declare @field: @Deprecated * *.foo: @MyAnnotation; + //uncomment the line below to prove our test should work + //declare @field: long *.foo: @MyAnnotation; + + public static void main(String argz[]) throws Exception { + Field idField = Test.class.getDeclaredField("foo"); + idField.setAccessible(true); + assert idField.getAnnotation(MyAnnotation.class) != null; + } +} + +class Test { + private long foo; +} + +@Retention(RetentionPolicy.RUNTIME) +@interface MyAnnotation { +} |