blob: 51bb6b419ed6f100aa1c8afd33c72d3ef7f644fd (
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
28
29
30
31
|
public class pr115250_2 {
public static void main(String[] args) {
new C().foo();
}
static class C {
C foo() { return null; }
}
// properly get compiler error wrt return type of join point
static aspect Normal {
C around() : execution(* C.foo()) {
return proceed();
}
}
// no compiler error wrt return type of join point
static abstract aspect SS<Target> {
abstract protected pointcut exec();
Target around() : exec() { // expect CE for execution(C.new());
System.err.println("funky advice running");
return proceed();
}
}
static aspect A extends SS<C> {
protected pointcut exec() : execution(* C.foo());
}
}
|