913N/A/*
913N/A * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
913N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
913N/A *
913N/A * This code is free software; you can redistribute it and/or modify it
913N/A * under the terms of the GNU General Public License version 2 only, as
913N/A * published by the Free Software Foundation.
913N/A *
913N/A * This code is distributed in the hope that it will be useful, but WITHOUT
913N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
913N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
913N/A * version 2 for more details (a copy is included in the LICENSE file that
913N/A * accompanied this code).
913N/A *
913N/A * You should have received a copy of the GNU General Public License version
913N/A * 2 along with this work; if not, write to the Free Software Foundation,
913N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
913N/A *
913N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
913N/A * or visit www.oracle.com if you need additional information or have any
913N/A * questions.
913N/A */
913N/A
913N/A/*
913N/A * @test
913N/A * @bug 6943289 7020044
913N/A *
913N/A * @summary Project Coin: Improved Exception Handling for Java (aka 'multicatch')
913N/A * @author mcimadamore
913N/A * @compile Pos09.java
913N/A *
913N/A */
913N/A
913N/Aclass Pos09 {
913N/A
913N/A static class Foo<X> {
913N/A Foo(X x) {}
913N/A }
913N/A
913N/A static interface Base<X> {}
913N/A static class A extends Exception implements Base<String> {}
913N/A static class B extends Exception implements Base<Integer> {}
913N/A
913N/A void m() {
913N/A try {
913N/A if (true) {
913N/A throw new A();
913N/A }
913N/A else {
913N/A throw new B();
913N/A }
913N/A } catch (A | B ex) {
913N/A Foo<?> f = new Foo<>(ex);
913N/A }
913N/A }
913N/A}