author | mcimadamore |
Wed, 26 Oct 2016 15:41:25 +0100 | |
changeset 41856 | 13a056e8f16e |
parent 25308 | 190cac01c316 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
25308
190cac01c316
8044236: create .out files for DefiniteAssignment tests in tools/javac dir
sogoel
parents:
5520
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
10 | 3 |
* @bug 4053998 |
4 |
* @summary Compiler used to not notice the uncaught checked exception. |
|
5 |
* @author turnidge |
|
6 |
* |
|
25308
190cac01c316
8044236: create .out files for DefiniteAssignment tests in tools/javac dir
sogoel
parents:
5520
diff
changeset
|
7 |
* @compile/fail/ref=UncaughtException.out -XDrawDiagnostics UncaughtException.java |
10 | 8 |
*/ |
9 |
||
10 |
interface I { |
|
11 |
void throwCheckedException (); |
|
12 |
} |
|
13 |
||
14 |
class A { |
|
15 |
public void throwCheckedException () throws Throwable { |
|
16 |
throw new Throwable(); |
|
17 |
} |
|
18 |
} |
|
19 |
||
20 |
class B extends A implements I { |
|
21 |
} |
|
22 |
||
23 |
public class UncaughtException { |
|
24 |
public static void main (String[] args) { |
|
25 |
I b = new B(); |
|
26 |
b.throwCheckedException(); |
|
27 |
} |
|
28 |
} |