langtools/test/tools/javac/6304921/T6304921.java
author duke
Sat, 01 Dec 2007 00:00:00 +0000
changeset 10 06bc494ca11e
child 323 ba0845d0b4dc
permissions -rw-r--r--
Initial load

/*
 * @test (important: no SCCS keywords to affect offsets in golden file.)  /nodynamiccopyright/
 * @bug 6304921
 * @ignore
 *    Need to fix this test post whitespace normalization
 * @compile/fail/ref=T6304921.out -XDstdout -XDcompilePolicy=bytodo -XDdiags=%b:%s/%o/%e:%_%t%m|%p%m -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
    }
}