You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MissingReturns.java 502B

12345678910111213141516171819202122
  1. import org.aspectj.testing.Tester;
  2. // PR#138, PR#139
  3. // error message could be more informatinve (PR#139)
  4. aspect MissingReturns {
  5. int baz(int a) { return 1; }
  6. void around(): this(MissingReturns) && call(int baz(int)) {
  7. // SHOULD BE:
  8. // static advice() returns int: MissingReturns && int baz(int) {
  9. return proceed();
  10. }
  11. pointcut cut(): this(MissingReturns) && call(int baz(int));
  12. void around(): cut() {
  13. proceed();
  14. return 2;
  15. }
  16. }