langtools/test/tools/javac/VoidArray.java
author jjg
Wed, 10 Aug 2016 15:47:46 -0700
changeset 40308 274367a99f98
parent 26901 2c11dc81a5c8
permissions -rw-r--r--
8136930: Simplify use of module-system options by custom launchers 8160489: Multiple -Xpatch lines ignored by javac 8156998: javac should support new option -XinheritRuntimeEnvironment Reviewed-by: jlahoda, ksrini

/*
 * @test /nodynamiccopyright/
 * @bug 4034979
 * @summary The compiler should never allow void[] to appear as a type
 *          in a program.
 *
 * @compile/fail/ref=VoidArray.out -XDrawDiagnostics VoidArray.java
 */

public
class VoidArray {
    void[] a = null;

    void[] method2(void[][] x) {
        return null;
    }
}