summaryrefslogtreecommitdiffstats
path: root/tests/bugs/CircularDominates.java
blob: b35423e8b4d322d04a7b5546c83dad0ea34297db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import org.aspectj.testing.Tester;
import java.util.*;

/** @testcase PR#902 circularity in declare dominates */
public class CircularDominates {

    public static void main(String[] args) {
		foo();
		throw new Error("expected compiler error");
    }

    public static void foo() {
    }
}

aspect BugDemoAspect {
    declare dominates : B, A, B; // CE 18
}

aspect A {
    before() : target(CircularDominates) && call(static void foo(..)) {
    }
}

aspect B {
    before() : cflowbelow(execution(static void main(String[]))) {
    }
}