jdk
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=Neg01.out -XDrawDiagnostics Neg01.java
8*/
9
10class Neg01 {11static class A extends Exception {}12static class B1 extends A {}13static class B2 extends A {}14
15class Test {16void m() throws A {17try {18throw new B1();19} catch (final A ex1) {20try {21throw ex1; // used to throw A, now throws B1!22} catch (B2 ex2) { }//unreachable23}24}25}26}
27