aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs162/pr246264/A.java
blob: 919166af7bf9e3c1746a601a01f690c6d705ac73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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);
    }
  }
}