langtools/test/tools/javac/Parens2.java
author lana
Thu, 21 Jan 2016 09:46:01 -0800
changeset 35340 38f7386ed942
parent 26662 7cf828d7c8fc
permissions -rw-r--r--
Added tag jdk-9+102 for changeset 7e3feb2ba5b3

/*
 * @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);
    }
}