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.

CircularDominates.java 541B

1234567891011121314151617181920212223242526272829
  1. import org.aspectj.testing.Tester;
  2. import java.util.*;
  3. /** @testcase PR#902 circularity in declare dominates */
  4. public class CircularDominates {
  5. public static void main(String[] args) {
  6. foo();
  7. throw new Error("expected compiler error");
  8. }
  9. public static void foo() {
  10. }
  11. }
  12. aspect BugDemoAspect {
  13. declare dominates : B, A, B; // CE 18
  14. }
  15. aspect A {
  16. before() : target(CircularDominates) && call(static void foo(..)) {
  17. }
  18. }
  19. aspect B {
  20. before() : cflowbelow(execution(static void main(String[]))) {
  21. }
  22. }