Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

12345678910111213141516171819202122232425262728293031
  1. public class pr115250_2 {
  2. public static void main(String[] args) {
  3. new C().foo();
  4. }
  5. static class C {
  6. C foo() { return null; }
  7. }
  8. // properly get compiler error wrt return type of join point
  9. static aspect Normal {
  10. C around() : execution(* C.foo()) {
  11. return proceed();
  12. }
  13. }
  14. // no compiler error wrt return type of join point
  15. static abstract aspect SS<Target> {
  16. abstract protected pointcut exec();
  17. Target around() : exec() { // expect CE for execution(C.new());
  18. System.err.println("funky advice running");
  19. return proceed();
  20. }
  21. }
  22. static aspect A extends SS<C> {
  23. protected pointcut exec() : execution(* C.foo());
  24. }
  25. }