aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs162
diff options
context:
space:
mode:
authoraclement <aclement>2008-09-04 19:07:22 +0000
committeraclement <aclement>2008-09-04 19:07:22 +0000
commitcdd9d5fe5cf01ec317e1fee948fa1962e9465f6e (patch)
tree40f0bc3866b0441e84e7bdf2f2fa4b0bdf13d1fb /tests/bugs162
parent7d9cd79e1bf3dbfe4c2e6c51bf37143bcbfb92aa (diff)
downloadaspectj-cdd9d5fe5cf01ec317e1fee948fa1962e9465f6e.tar.gz
aspectj-cdd9d5fe5cf01ec317e1fee948fa1962e9465f6e.zip
246264: test and fix
Diffstat (limited to 'tests/bugs162')
-rw-r--r--tests/bugs162/pr246264/A.java19
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);
+ }
+ }
+}