aboutsummaryrefslogtreecommitdiffstats
path: root/tests/new/NonexistentFieldInitializers.java
blob: d0ec6ebc4e89196788cbd2057f401ff10cc3811a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// join points in field initializers aren't showing up.

import org.aspectj.testing.Tester;

public class NonexistentFieldInitializers {
    public static void main(String[] args) {
	new NonexistentFieldInitializers();
	Tester.checkEqual(A.i, 2, "Not finding some join points in initializers");
    }

    static Object so = System.in;

    Object o = System.in;
}

aspect A {
    static int i;

    before(): get(* System.in)  {
	i++;
    }
}