test/tools/javac/6304921/T6304921.java

Sat, 01 Dec 2007 00:00:00 +0000

author
duke
date
Sat, 01 Dec 2007 00:00:00 +0000
changeset 1
9a66ca7c79fa
child 16
058bdd3ca02e
permissions
-rw-r--r--

Initial load

     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  */
     9 import java.util.ArrayList;
    10 import java.util.List;
    12 class T6304921 {
    13     void m1(int i) {
    14         switch (i) {
    15         case 1:
    16             i++;
    17             // fallthrough
    18         default:
    19         }
    21         try {
    22             i++;
    23         }
    24         finally {
    25             throw new Error();
    26             // finally does not complete normally
    27         }
    28     }
    30     void m2() {
    31         List<Integer> list = new ArrayList();
    32     }
    33 }
    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 }

mercurial