aboutsummaryrefslogtreecommitdiffstats
path: root/tests/binding/UnfoundConstructor.java
blob: d3d39a5fc86679822a4e4e3d8f709e88b8926183 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import org.aspectj.testing.Tester;

/** @testcase no such constructor for proceed argument (error) */
public class UnfoundConstructor {
    public static void main (String[] args) {
        I i = new B();
        String s = i.toString();
    } 
}


interface I { }

class B implements I { }

class Mock implements I {
    Mock(B toMock) { }
}

aspect A {
    Object around(I targ) : 
        target(targ) && target(B) && call(* *(..)) {
        return proceed(new Mock(targ)); // CE 25: no such constructor
    }
}