jdk-24/langtools/test/tools/javac/declaration/method/MethodVoidParameter.java
Jan Lahoda 38ef229e3f 8026374: javac accepts void as a method parameter
Changing Check.validate to reject void types.

Reviewed-by: jjg, vromero
2013-11-26 15:27:19 +01:00

10 lines
281 B
Java

/* @test /nodynamiccopyright/
* @bug 8026374
* @summary Cannot use void as a variable type
* @compile/fail/ref=MethodVoidParameter.out -XDrawDiagnostics MethodVoidParameter.java
*/
public class MethodVoidParameter {
void method(void v) { }
void method(void... v) { }
}