1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/tools/javac/6304921/T6304921.java Sat Dec 01 00:00:00 2007 +0000 1.3 @@ -0,0 +1,42 @@ 1.4 +/* 1.5 + * @test (important: no SCCS keywords to affect offsets in golden file.) /nodynamiccopyright/ 1.6 + * @bug 6304921 1.7 + * @ignore 1.8 + * Need to fix this test post whitespace normalization 1.9 + * @compile/fail/ref=T6304921.out -XDstdout -XDcompilePolicy=bytodo -XDdiags=%b:%s/%o/%e:%_%t%m|%p%m -Xjcov -Xlint:all,-path -Werror T6304921.java 1.10 + */ 1.11 + 1.12 +import java.util.ArrayList; 1.13 +import java.util.List; 1.14 + 1.15 +class T6304921 { 1.16 + void m1(int i) { 1.17 + switch (i) { 1.18 + case 1: 1.19 + i++; 1.20 + // fallthrough 1.21 + default: 1.22 + } 1.23 + 1.24 + try { 1.25 + i++; 1.26 + } 1.27 + finally { 1.28 + throw new Error(); 1.29 + // finally does not complete normally 1.30 + } 1.31 + } 1.32 + 1.33 + void m2() { 1.34 + List<Integer> list = new ArrayList(); 1.35 + } 1.36 +} 1.37 + 1.38 +class X { 1.39 + void m1() { 1.40 + System.orr.println("abc"); // name not found 1.41 + } 1.42 + boolean m2() { 1.43 + return 123 + true; // bad binary expression 1.44 + } 1.45 +}