langtools/test/tools/javac/Parens2.java
author duke
Wed, 05 Jul 2017 20:10:53 +0200
changeset 27979 cc2cf80c2f39
parent 26662 7cf828d7c8fc
permissions -rw-r--r--
Merge

/*
 * @test /nodynamiccopyright/
 * @bug 4408036
 * @summary Compiler accepted "(i=2);" as a valid expession statement.
 * @author gafter
 *
 * @compile/fail/ref=Parens2.out -XDrawDiagnostics Parens2.java
 */

class Parens2 {
    void f() {
        int i;
        (i = 2);
    }
}