--- /dev/null
+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);
+ }
+ }
+}
public class Ajc162Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
- // AspectJ1.6.2
+ // AspectJ1.6.2
+ public void testAnnoValueBinding_pr246264() { runTest("anno value binding"); }
public void testAroundAdviceProceed_pr211607() { runTest("around advice proceed"); }
// public void testAdvisingInterfaces_pr163005() { runTest("advising joinpoints in interfaces"); }
public void testChainedItds_pr176905() { runTest("chained itds"); }
<!-- AspectJ v1.6.2 Tests -->
<suite>
+ <ajc-test dir="bugs162/pr246264" title="anno value binding">
+ <compile options="-1.5" files="A.java"/>
+ <run class="A"/>
+ </ajc-test>
+
<ajc-test dir="bugs162/pr211607" title="around advice proceed">
<compile options="-1.5" files="Bug.java"/>
<run class="Bug"/>