aboutsummaryrefslogtreecommitdiffstats
path: root/tests/errors/NoReturnStatement.java
blob: b60d4fc46db4908fd9e0d4fababa826d6f522552 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import org.aspectj.testing.Tester;

// PR#280 return statement not present in around with returns

public aspect NoReturnStatement {
    public static void main(String[] args) { test(); }
    
    public static void test() {
	    Tester.check(true, "passed");
    }
    
    public int m() { return 1; }
    
    int around(C t): target(t) && call(int m()) {
	    int x = proceed(t);
        // uncomment this to make code compile:
        //    return x;
    }
}

class C {
    public int m() { return 1; }
}