test/tools/javac/6304921/T6304921.java

Wed, 09 Apr 2008 11:19:15 -0700

author
xdono
date
Wed, 09 Apr 2008 11:19:15 -0700
changeset 15
18f0b1b5ffd6
parent 1
9a66ca7c79fa
child 16
058bdd3ca02e
permissions
-rw-r--r--

Added tag jdk7-b25 for changeset 58039502942e

     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