jdk-24/langtools/test/tools/javac/parser/ErroneousParameters.java
Jan Lahoda 74250736aa 8031383: Error recovery in JavacParser could be improved
Improving error recovery in JavacParser by avoiding artificial nextToken in JavacParser.reportSyntaxError.

Co-authored-by: Dusan Balek <dusan.balek@oracle.com>
Reviewed-by: jjg, jfranck
2014-02-28 20:25:24 +01:00

17 lines
527 B
Java

/*
* @test /nodynamiccopyright/
* @bug 8030091 8031383
* @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=) { }
}