aoqi@0: /* aoqi@0: * @test /nodynamiccopyright/ aoqi@0: * @bug 6943289 aoqi@0: * aoqi@0: * @summary Project Coin: Improved Exception Handling for Java (aka 'multicatch') aoqi@0: * @author mcimadamore aoqi@0: * @compile/fail/ref=Neg04eff_final.out -XDrawDiagnostics Neg04eff_final.java aoqi@0: * aoqi@0: */ aoqi@0: aoqi@0: class Neg04eff_final { aoqi@0: static class A extends Exception {} aoqi@0: static class B extends Exception {} aoqi@0: aoqi@0: void test() throws B { aoqi@0: try { aoqi@0: if (true) { aoqi@0: throw new A(); aoqi@0: } else if (false) { aoqi@0: throw new B(); aoqi@0: } else { aoqi@0: throw (Throwable)new Exception(); aoqi@0: } aoqi@0: } aoqi@0: catch (A e) {} aoqi@0: catch (Exception e) { aoqi@0: throw e; aoqi@0: } aoqi@0: catch (Throwable t) {} aoqi@0: } aoqi@0: }