diff options
Diffstat (limited to 'tests/bugs150/pr98901/Case28.aj')
-rw-r--r-- | tests/bugs150/pr98901/Case28.aj | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/bugs150/pr98901/Case28.aj b/tests/bugs150/pr98901/Case28.aj new file mode 100644 index 000000000..00896d7fb --- /dev/null +++ b/tests/bugs150/pr98901/Case28.aj @@ -0,0 +1,26 @@ +// "public ITD-on-itself field with declare @field" + +import java.lang.annotation.*; +import java.lang.reflect.Field; + +@Retention(RetentionPolicy.RUNTIME) +@interface anInterface{} + +aspect B28 { + + public int B28.a; + declare @field : int B28.a : @anInterface; + + public static void main(String [] args){ + Class c = B28.class; + try { + Field m = c.getDeclaredField("a"); + Annotation [] anns = m.getDeclaredAnnotations(); + for (int i = 0;i < anns.length;i++){ + System.out.println(anns[i]); + } + } catch (Exception e){ + System.out.println("exceptional!"); + } + } +} |