mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
8026374: javac accepts void as a method parameter
Changing Check.validate to reject void types. Reviewed-by: jjg, vromero
This commit is contained in:
parent
979151dfa9
commit
38ef229e3f
4 changed files with 22 additions and 1 deletions
|
@ -0,0 +1,9 @@
|
|||
/* @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) { }
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue