author | lana |
Tue, 25 Apr 2017 07:38:50 +0000 | |
changeset 44909 | b53c770dc04f |
parent 25693 | b9f1261db3b4 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
25693
b9f1261db3b4
8048836: .out files for generics tests in tools/javac dir
sogoel
parents:
5520
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
10 | 3 |
* @bug 5057445 |
4 |
* @summary javac allows catching type parameter |
|
5 |
* @author gafter |
|
6 |
* |
|
25693
b9f1261db3b4
8048836: .out files for generics tests in tools/javac dir
sogoel
parents:
5520
diff
changeset
|
7 |
* @compile/fail/ref=CatchTyparam.out -XDrawDiagnostics CatchTyparam.java |
10 | 8 |
*/ |
9 |
||
10 |
class J { |
|
11 |
<T extends Error, U extends Error> void foo() { |
|
12 |
try { |
|
13 |
int i = 12; |
|
14 |
} catch (T ex) { |
|
15 |
} catch (U ex) { |
|
16 |
} |
|
17 |
} |
|
18 |
} |