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.

UnwovenAdviceNotCheckedCE.java 587B

12345678910111213141516171819202122
  1. /** Currently there are no messages emitted for
  2. * compile-time errors from advice bodies if the
  3. * advice is not woven into the base class.
  4. * This can lead to silent failures.
  5. */
  6. class UnwovenAdviceNotCheckedCE {
  7. public static void main(String[] args) {
  8. System.err.println("main");
  9. }
  10. }
  11. aspect Aspect {
  12. void around (String[] args)
  13. : args(args)
  14. && call(void UnwovenAdviceNotCheckedCE.main()) { // forgot (..), so unwoven
  15. System.err.println("before main");
  16. proceed() ; // CE: should get compile error here - need (args)
  17. System.err.println("after main");
  18. }
  19. }