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.

NoReturnStatement.java 510B

1234567891011121314151617181920212223
  1. import org.aspectj.testing.Tester;
  2. // PR#280 return statement not present in around with returns
  3. public aspect NoReturnStatement {
  4. public static void main(String[] args) { test(); }
  5. public static void test() {
  6. Tester.check(true, "passed");
  7. }
  8. public int m() { return 1; }
  9. int around(C t): target(t) && call(int m()) {
  10. int x = proceed(t);
  11. // uncomment this to make code compile:
  12. // return x;
  13. }
  14. }
  15. class C {
  16. public int m() { return 1; }
  17. }