aboutsummaryrefslogtreecommitdiffstats
path: root/tests/design/intro/ExceptionsCF.java
blob: 4bf8dc661bc2dab5f3ec489d76c4e24a1b1abec6 (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
import org.aspectj.testing.Tester;

import java.io.IOException;

public class ExceptionsCF {
    public static void main(String[] args) {
        C c = new C();
        c.foo();  // ERR: can't throw IOException here
    }
}
class Root {
	public void bar() {}
}

class C extends Root {
	
}


aspect A {
	public void C.foo() throws IOException { }
	
	public void C.bar() throws IOException {}  // ERR: can't throw more than super
}