langtools/test/tools/javac/generics/CatchTyparam.java
author sogoel
Fri, 15 May 2015 16:53:42 -0700
changeset 30721 1024d425d97e
parent 25693 b9f1261db3b4
permissions -rw-r--r--
8074425: Group 13b: golden files for tests in tools/javac/generics dir Reviewed-by: jjg, darcy, mcimadamore

/*
 * @test /nodynamiccopyright/
 * @bug 5057445
 * @summary javac allows catching type parameter
 * @author gafter
 *
 * @compile/fail/ref=CatchTyparam.out -XDrawDiagnostics  CatchTyparam.java
 */

class J {
    <T extends Error, U extends Error> void foo() {
        try {
            int i = 12;
        } catch (T ex) {
        } catch (U ex) {
        }
    }
}