jdk-24/test/langtools/tools/javac/VoidArray.java

18 lines
331 B
Java
Raw Normal View History

2007-12-01 00:00:00 +00:00
/*
* @test /nodynamiccopyright/
2007-12-01 00:00:00 +00:00
* @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
2007-12-01 00:00:00 +00:00
*/
public
class VoidArray {
void[] a = null;
void[] method2(void[][] x) {
return null;
}
}