Tue, 02 Feb 2010 10:56:10 -0800
6918625: handle annotations on array class literals
Reviewed-by: jjg, darcy
Contributed-by: mali@csail.mit.edu, mernst@cs.washington.edu
1 /*
2 * @test (important: no SCCS keywords to affect offsets in golden file.) /nodynamiccopyright/
3 * @bug 6304921
4 * @compile/fail/ref=T6304921.out -XDstdout -XDcompilePolicy=bytodo -XDrawDiagnostics -Xjcov -Xlint:all,-path -Werror T6304921.java
5 */
7 import java.util.ArrayList;
8 import java.util.List;
10 class T6304921 {
11 void m1(int i) {
12 switch (i) {
13 case 1:
14 i++;
15 // fallthrough
16 default:
17 }
19 try {
20 i++;
21 }
22 finally {
23 throw new Error();
24 // finally does not complete normally
25 }
26 }
28 void m2() {
29 List<Integer> list = new ArrayList();
30 }
31 }
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 }