diff -r 000000000000 -r 959103a6100f test/tools/javac/lambda/BadNestedLambda.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/lambda/BadNestedLambda.java Wed Apr 27 01:34:52 2016 +0800 @@ -0,0 +1,11 @@ +/* + * @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; + } +}