10
|
1 |
/*
|
|
2 |
* @test (important: no SCCS keywords to affect offsets in golden file.) /nodynamiccopyright/
|
|
3 |
* @bug 6304921
|
|
4 |
* @ignore
|
|
5 |
* Need to fix this test post whitespace normalization
|
|
6 |
* @compile/fail/ref=T6304921.out -XDstdout -XDcompilePolicy=bytodo -XDdiags=%b:%s/%o/%e:%_%t%m|%p%m -Xjcov -Xlint:all,-path -Werror T6304921.java
|
|
7 |
*/
|
|
8 |
|
|
9 |
import java.util.ArrayList;
|
|
10 |
import java.util.List;
|
|
11 |
|
|
12 |
class T6304921 {
|
|
13 |
void m1(int i) {
|
|
14 |
switch (i) {
|
|
15 |
case 1:
|
|
16 |
i++;
|
|
17 |
// fallthrough
|
|
18 |
default:
|
|
19 |
}
|
|
20 |
|
|
21 |
try {
|
|
22 |
i++;
|
|
23 |
}
|
|
24 |
finally {
|
|
25 |
throw new Error();
|
|
26 |
// finally does not complete normally
|
|
27 |
}
|
|
28 |
}
|
|
29 |
|
|
30 |
void m2() {
|
|
31 |
List<Integer> list = new ArrayList();
|
|
32 |
}
|
|
33 |
}
|
|
34 |
|
|
35 |
class X {
|
|
36 |
void m1() {
|
|
37 |
System.orr.println("abc"); // name not found
|
|
38 |
}
|
|
39 |
boolean m2() {
|
|
40 |
return 123 + true; // bad binary expression
|
|
41 |
}
|
|
42 |
}
|