aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs1612/pr315398/Code.java
blob: 22e6f1acf79d4c57f8d7854f5d2c7a0eb9f79ed5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
public aspect Code {

  static int[] a = new int[]{1,2,3};

  static void f(){
    System.out.println(a[0]);
    new Test(a[0]++);
    System.out.println(a[0]);
  }

  before(): call(Test.new(..)) {
    System.out.println("advice");
  }

  public static void main(String []argv) {
   f();
 }
}

class Test {
  Test(int i) {}
}