langtools/test/tools/javac/6304921/T6304921.java
author mikejwre
Wed, 09 Jun 2010 18:56:41 -0700
changeset 5634 895b66935810
parent 2984 e15ff3a34054
child 6150 d055fa8ced62
permissions -rw-r--r--
Merge

/*
 * @test (important: no SCCS keywords to affect offsets in golden file.)  /nodynamiccopyright/
 * @bug 6304921
 * @compile/fail/ref=T6304921.out -XDstdout -XDcompilePolicy=bytodo -XDrawDiagnostics -Xjcov -Xlint:all,-path -Werror T6304921.java
 */

import java.util.ArrayList;
import java.util.List;

class T6304921 {
    void m1(int i) {
        switch (i) {
        case 1:
            i++;
            // fallthrough
        default:
        }

        try {
            i++;
        }
        finally {
            throw new Error();
            // finally does not complete normally
        }
    }

    void m2() {
        List<Integer> list = new ArrayList();
    }
}

class X {
    void m1() {
        System.orr.println("abc"); // name not found
    }
    boolean m2() {
        return 123 + true; // bad binary expression
    }
}