langtools/test/tools/javac/VoidArray.java
author amurillo
Mon, 11 Apr 2016 20:38:38 -0700
changeset 37298 8df0cc9da41e
parent 26901 2c11dc81a5c8
permissions -rw-r--r--
8154028: Several hotspot tests need to be updated after 8153737 (Unsupported Module) Reviewed-by: darcy, kvn

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