jdk
1/*
2* @test /nodynamiccopyright/
3* @bug 6943289 6993963
4*
5* @summary Project Coin: Improved Exception Handling for Java (aka 'multicatch')
6* @author mcimadamore
7* @compile/fail/ref=Neg02eff_final.out -XDrawDiagnostics Neg02eff_final.java
8*
9*/
10
11class Neg02eff_final {
12static class A extends Exception {}
13static class B extends Exception {}
14
15void m() {
16try {
17if (true) {
18throw new A();
19}
20else {
21throw new B();
22}
23} catch (A | B ex) {
24ex = new B();
25}
26}
27}
28