2007-12-01 00:00:00 +00:00
|
|
|
/*
|
2014-07-17 11:14:39 -07:00
|
|
|
* @test /nodynamiccopyright/
|
2007-12-01 00:00:00 +00:00
|
|
|
* @bug 5057445
|
|
|
|
* @summary javac allows catching type parameter
|
|
|
|
* @author gafter
|
|
|
|
*
|
2014-07-17 11:14:39 -07:00
|
|
|
* @compile/fail/ref=CatchTyparam.out -XDrawDiagnostics CatchTyparam.java
|
2007-12-01 00:00:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
class J {
|
|
|
|
<T extends Error, U extends Error> void foo() {
|
|
|
|
try {
|
|
|
|
int i = 12;
|
|
|
|
} catch (T ex) {
|
|
|
|
} catch (U ex) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|