author | mikejwre |
Wed, 09 Jun 2010 18:56:41 -0700 | |
changeset 5634 | 895b66935810 |
parent 2984 | e15ff3a34054 |
child 6150 | d055fa8ced62 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
2 |
* @test (important: no SCCS keywords to affect offsets in golden file.) /nodynamiccopyright/ |
|
3 |
* @bug 6304921 |
|
2984
e15ff3a34054
6722234: javac diagnostics need better integration with the type-system
mcimadamore
parents:
323
diff
changeset
|
4 |
* @compile/fail/ref=T6304921.out -XDstdout -XDcompilePolicy=bytodo -XDrawDiagnostics -Xjcov -Xlint:all,-path -Werror T6304921.java |
10 | 5 |
*/ |
6 |
||
7 |
import java.util.ArrayList; |
|
8 |
import java.util.List; |
|
9 |
||
10 |
class T6304921 { |
|
11 |
void m1(int i) { |
|
12 |
switch (i) { |
|
13 |
case 1: |
|
14 |
i++; |
|
15 |
// fallthrough |
|
16 |
default: |
|
17 |
} |
|
18 |
||
19 |
try { |
|
20 |
i++; |
|
21 |
} |
|
22 |
finally { |
|
23 |
throw new Error(); |
|
24 |
// finally does not complete normally |
|
25 |
} |
|
26 |
} |
|
27 |
||
28 |
void m2() { |
|
29 |
List<Integer> list = new ArrayList(); |
|
30 |
} |
|
31 |
} |
|
32 |
||
33 |
class X { |
|
34 |
void m1() { |
|
35 |
System.orr.println("abc"); // name not found |
|
36 |
} |
|
37 |
boolean m2() { |
|
38 |
return 123 + true; // bad binary expression |
|
39 |
} |
|
40 |
} |