test/tools/javac/lambda/BadNestedLambda.java

changeset 0
959103a6100f
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/test/tools/javac/lambda/BadNestedLambda.java	Wed Apr 27 01:34:52 2016 +0800
     1.3 @@ -0,0 +1,11 @@
     1.4 +/*
     1.5 + * @test /nodynamiccopyright/
     1.6 + * @bug 8017618
     1.7 + * @summary NullPointerException in RichDiagnosticFormatter for bad input program
     1.8 + * @compile/fail/ref=BadNestedLambda.out -XDrawDiagnostics BadNestedLambda.java
     1.9 + */
    1.10 +class BadNestedLambda {
    1.11 +    void test() {
    1.12 +        Runnable add = (int x) -> (int y) -> x + y;
    1.13 +    }
    1.14 +}

mercurial