aboutsummaryrefslogtreecommitdiffstats
path: root/tests/errors/InvalidReturn.java
blob: 9ff3eb33598d66f12c3a0efecea1c27c86bf85cb (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
package errors;

public class InvalidReturn {
    public int doNothing() { return 0; }
    public static void test() {}
}

aspect C {
    pointcut iCut(): this(*) && call(int *(..));

    before(): iCut() {
        return -1;
    }

    after(): iCut() {
        return 1;
    }
    after() returning (): iCut() {
        return 1;
    }
    after() throwing (ArithmeticException e): iCut() {
        return -1;
    }
}