jdk-24/langtools/test/tools/javac/lambda/BadNestedLambda.java
Maurizio Cimadamore 7e6f7dcca5 8017618: NullPointerException in RichDiagnosticFormatter for bad input program
RDF crashes when diagnostic contains type 'void'

Reviewed-by: jjg, vromero
2013-07-05 11:00:19 +01:00

12 lines
317 B
Java

/*
* @test /nodynamiccopyright/
* @bug 8017618
* @summary NullPointerException in RichDiagnosticFormatter for bad input program
* @compile/fail/ref=BadNestedLambda.out -XDrawDiagnostics BadNestedLambda.java
*/
class BadNestedLambda {
void test() {
Runnable add = (int x) -> (int y) -> x + y;
}
}