jdk-24/langtools/test/tools/javac/parser/ErroneousParameters.java
Jan Lahoda 4724c454cd 8030091: Request to update error messages from javac for negative varargs test cases
Introducing a new error message for vararg parameter not being the last parameter, improving error message for unexpected character after a parameter.

Reviewed-by: jjg, sogoel
2014-02-02 12:12:01 +01:00

17 lines
519 B
Java

/*
* @test /nodynamiccopyright/
* @bug 8030091
* @summary Producing reasonable errors for unexpected tokens in method parameters
* @compile/fail/ref=ErroneousParameters.out -XDrawDiagnostics ErroneousParameters.java
*/
public class ErroneousParameters {
public static void test(int... extraVarArg, int additionalParam) { }
public static void test(byte param...) { }
public static void test(char param,) { }
public static void test(short param[) { }
public static void test(int param=) { }
}