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 darcy aoqi@0: * @compile/fail/ref=Neg01.out -XDrawDiagnostics Neg01.java aoqi@0: * @compile -source 6 -XDrawDiagnostics Neg01.java aoqi@0: * aoqi@0: */ aoqi@0: aoqi@0: class Neg01 { aoqi@0: static class A extends Exception {} aoqi@0: static class B1 extends A {} aoqi@0: static class B2 extends A {} aoqi@0: aoqi@0: class Test { aoqi@0: void m() throws A { aoqi@0: try { aoqi@0: throw new B1(); aoqi@0: } catch (final A ex1) { aoqi@0: try { aoqi@0: throw ex1; // used to throw A, now throws B1! aoqi@0: } catch (B2 ex2) { }//unreachable aoqi@0: } aoqi@0: } aoqi@0: } aoqi@0: }