mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-07-24 13:54:45 +02:00
23 lines
502 B
Java
23 lines
502 B
Java
![]() |
|
||
|
import org.aspectj.testing.Tester;
|
||
|
|
||
|
// PR#138, PR#139
|
||
|
// error message could be more informatinve (PR#139)
|
||
|
|
||
|
aspect MissingReturns {
|
||
|
|
||
|
int baz(int a) { return 1; }
|
||
|
|
||
|
void around(): this(MissingReturns) && call(int baz(int)) {
|
||
|
// SHOULD BE:
|
||
|
// static advice() returns int: MissingReturns && int baz(int) {
|
||
|
return proceed();
|
||
|
}
|
||
|
|
||
|
pointcut cut(): this(MissingReturns) && call(int baz(int));
|
||
|
void around(): cut() {
|
||
|
proceed();
|
||
|
return 2;
|
||
|
}
|
||
|
}
|