test/tools/javac/multicatch/Neg05.java

changeset 917
d7dfa105f159
parent 888
0d056b7b93de
parent 916
cb9493a80341
child 920
3d7acdbb72ca
     1.1 --- a/test/tools/javac/multicatch/Neg05.java	Thu Mar 10 17:11:19 2011 -0800
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,33 +0,0 @@
     1.4 -/*
     1.5 - * @test /nodynamiccopyright/
     1.6 - * @bug 6943289
     1.7 - *
     1.8 - * @summary Project Coin: Improved Exception Handling for Java (aka 'multicatch')
     1.9 - * @author mcimadamore
    1.10 - * @compile/fail/ref=Neg05.out -XDrawDiagnostics Neg05.java
    1.11 - *
    1.12 - */
    1.13 -
    1.14 -class Neg02 {
    1.15 -
    1.16 -    static class Foo<X> {
    1.17 -       Foo(X x) {}
    1.18 -    }
    1.19 -
    1.20 -    static interface Base<X> {}
    1.21 -    static class A extends Exception implements Base<String> {}
    1.22 -    static class B extends Exception implements Base<Integer> {}
    1.23 -
    1.24 -    void m() {
    1.25 -        try {
    1.26 -            if (true) {
    1.27 -                throw new A();
    1.28 -            }
    1.29 -            else {
    1.30 -                throw new B();
    1.31 -            }
    1.32 -        } catch (A | B ex) {
    1.33 -            Foo<?> f = new Foo<>(ex);
    1.34 -        }
    1.35 -    }
    1.36 -}

mercurial