langtools/test/tools/javac/DefiniteAssignment/T4717165.java
author sogoel
Fri, 05 Sep 2014 16:43:00 -0700
changeset 26528 a1a7ad15183e
parent 25308 190cac01c316
permissions -rw-r--r--
8055075: Group 9b: golden files for tests in tools/javac dir Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
25308
190cac01c316 8044236: create .out files for DefiniteAssignment tests in tools/javac dir
sogoel
parents: 5520
diff changeset
     2
 * @test /nodynamiccopyright/
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     3
 * @bug 4717165
06bc494ca11e Initial load
duke
parents:
diff changeset
     4
 * @summary when can a statement complete normally? (break&continue versus finally)
06bc494ca11e Initial load
duke
parents:
diff changeset
     5
 * @author Neal Gafter (gafter)
06bc494ca11e Initial load
duke
parents:
diff changeset
     6
 *
25308
190cac01c316 8044236: create .out files for DefiniteAssignment tests in tools/javac dir
sogoel
parents: 5520
diff changeset
     7
 * @compile/fail/ref=T4717165.out -XDrawDiagnostics  T4717165.java
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     8
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
     9
06bc494ca11e Initial load
duke
parents:
diff changeset
    10
class T4717165 {
06bc494ca11e Initial load
duke
parents:
diff changeset
    11
    void f() {
06bc494ca11e Initial load
duke
parents:
diff changeset
    12
        int i;
06bc494ca11e Initial load
duke
parents:
diff changeset
    13
        a: try {
06bc494ca11e Initial load
duke
parents:
diff changeset
    14
            break a;
06bc494ca11e Initial load
duke
parents:
diff changeset
    15
        } finally {
06bc494ca11e Initial load
duke
parents:
diff changeset
    16
            return;
06bc494ca11e Initial load
duke
parents:
diff changeset
    17
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
    18
        i = 12; // unreachable
06bc494ca11e Initial load
duke
parents:
diff changeset
    19
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    20
}