diff options
Diffstat (limited to 'tests/bugs162')
-rw-r--r-- | tests/bugs162/pr246264/A.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/bugs162/pr246264/A.java b/tests/bugs162/pr246264/A.java new file mode 100644 index 000000000..919166af7 --- /dev/null +++ b/tests/bugs162/pr246264/A.java @@ -0,0 +1,19 @@ +enum Color {R,G,B;} +@interface I { public Color a(); } +@interface J { public Color b() default Color.B; } + +public class A { + @J + @I(a=Color.R) + public static void main(String []argv) { + } +} + +aspect X { + + before(Color var): execution(* main(..)) && @annotation(I(var)) { + if (var!=Color.R) { + throw new RuntimeException("Wrong! Was "+var); + } + } +} |