mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-09-13 15:45:38 +02:00
d3156f737f
these tests were inspired by failures compiling observer example
25 lines
430 B
Java
25 lines
430 B
Java
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
|
|
}
|