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

/** @testcase PR#884 declare constructor on interface subclasses */
public class DeclareInterfaceConstructor {
    public static void main(String[] args) {
        X x = new Z(1);
        if (1 != x.i) {
            Tester.check(false, "bad constructor initialization");
        }
    }
}

interface X {}

class Z implements X {}

aspect Y {
    public int X.i;
    public X+.new(final int i) {this.i = i;}
}