1 /* 2 * @test /nodynamiccopyright/ 3 * @bug 6943289 4 * 5 * @summary Project Coin: Improved Exception Handling for Java (aka 'multicatch') 6 * @author darcy 7 * @compile/fail/ref=Neg01eff_final.out -XDrawDiagnostics Neg01eff_final.java 8 */ 9 10 class Neg01eff_final { 11 static class A extends Exception {} 12 static class B1 extends A {} 13 static class B2 extends A {} 14 15 class Test { 16 void m() throws A { 17 try { 18 throw new B1(); 19 } catch (A ex1) { 20 try { 21 throw ex1; // used to throw A, now throws B1! 22 } catch (B2 ex2) { }//unreachable 23 } 24 } 25 } 26 }