summaryrefslogtreecommitdiffstats
path: root/tests/new/finalMemInit/Driver.java
blob: 4a253e42a032a7a9417ec5d77029ed62600e5544 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import org.aspectj.testing.Tester;

// PR#162
// works with JDK > 1.2 but not with JDK < 1.1.8

public aspect Driver {
    public static void main(String[] args) { test(); }
    public static void test() {
        Tester.checkEqual(new C().fi, 1, "");
    }    
    pointcut install(): execution(new()) && within(C); 
    /*static*/ after () : install() { }
}

class C { 
    public final int fi; 
    C() { 
        fi = 1; 
    } 
}