langtools/test/tools/javac/parser/MissingClosingBrace.java
author sogoel
Thu, 05 Jun 2014 10:57:10 -0700
changeset 24797 850ebd4d80a7
parent 23133 a58476887b3d
permissions -rw-r--r--
8044072: Group 2: create .out files for OverrideChecks tests in tools/javac dir Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
23133
a58476887b3d 8031383: Error recovery in JavacParser could be improved
jlahoda
parents:
diff changeset
     1
/*
a58476887b3d 8031383: Error recovery in JavacParser could be improved
jlahoda
parents:
diff changeset
     2
 * @test /nodynamiccopyright/
a58476887b3d 8031383: Error recovery in JavacParser could be improved
jlahoda
parents:
diff changeset
     3
 * @bug 8031383
a58476887b3d 8031383: Error recovery in JavacParser could be improved
jlahoda
parents:
diff changeset
     4
 * @summary Verify that the parser handles a missing closing brace of a block gracefully.
a58476887b3d 8031383: Error recovery in JavacParser could be improved
jlahoda
parents:
diff changeset
     5
 * @compile/fail/ref=MissingClosingBrace.out -XDrawDiagnostics MissingClosingBrace.java
a58476887b3d 8031383: Error recovery in JavacParser could be improved
jlahoda
parents:
diff changeset
     6
 */
a58476887b3d 8031383: Error recovery in JavacParser could be improved
jlahoda
parents:
diff changeset
     7
a58476887b3d 8031383: Error recovery in JavacParser could be improved
jlahoda
parents:
diff changeset
     8
public class MissingClosingBrace {
a58476887b3d 8031383: Error recovery in JavacParser could be improved
jlahoda
parents:
diff changeset
     9
    private void test(int i) {
a58476887b3d 8031383: Error recovery in JavacParser could be improved
jlahoda
parents:
diff changeset
    10
        if (i > 0) {
a58476887b3d 8031383: Error recovery in JavacParser could be improved
jlahoda
parents:
diff changeset
    11
a58476887b3d 8031383: Error recovery in JavacParser could be improved
jlahoda
parents:
diff changeset
    12
    private int i;
a58476887b3d 8031383: Error recovery in JavacParser could be improved
jlahoda
parents:
diff changeset
    13
}