You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ExceptionsCF.java 430B

123456789101112131415161718192021222324
  1. import org.aspectj.testing.Tester;
  2. import java.io.IOException;
  3. public class ExceptionsCF {
  4. public static void main(String[] args) {
  5. C c = new C();
  6. c.foo(); // ERR: can't throw IOException here
  7. }
  8. }
  9. class Root {
  10. public void bar() {}
  11. }
  12. class C extends Root {
  13. }
  14. aspect A {
  15. public void C.foo() throws IOException { }
  16. public void C.bar() throws IOException {} // ERR: can't throw more than super
  17. }