langtools/test/tools/javac/lambda/BadNestedLambda.java
author mcimadamore
Fri, 05 Jul 2013 11:00:19 +0100
changeset 18900 5ed5dd2ee5fe
permissions -rw-r--r--
8017618: NullPointerException in RichDiagnosticFormatter for bad input program Summary: RDF crashes when diagnostic contains type 'void' Reviewed-by: jjg, vromero
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18900
5ed5dd2ee5fe 8017618: NullPointerException in RichDiagnosticFormatter for bad input program
mcimadamore
parents:
diff changeset
     1
/*
5ed5dd2ee5fe 8017618: NullPointerException in RichDiagnosticFormatter for bad input program
mcimadamore
parents:
diff changeset
     2
 * @test /nodynamiccopyright/
5ed5dd2ee5fe 8017618: NullPointerException in RichDiagnosticFormatter for bad input program
mcimadamore
parents:
diff changeset
     3
 * @bug 8017618
5ed5dd2ee5fe 8017618: NullPointerException in RichDiagnosticFormatter for bad input program
mcimadamore
parents:
diff changeset
     4
 * @summary NullPointerException in RichDiagnosticFormatter for bad input program
5ed5dd2ee5fe 8017618: NullPointerException in RichDiagnosticFormatter for bad input program
mcimadamore
parents:
diff changeset
     5
 * @compile/fail/ref=BadNestedLambda.out -XDrawDiagnostics BadNestedLambda.java
5ed5dd2ee5fe 8017618: NullPointerException in RichDiagnosticFormatter for bad input program
mcimadamore
parents:
diff changeset
     6
 */
5ed5dd2ee5fe 8017618: NullPointerException in RichDiagnosticFormatter for bad input program
mcimadamore
parents:
diff changeset
     7
class BadNestedLambda {
5ed5dd2ee5fe 8017618: NullPointerException in RichDiagnosticFormatter for bad input program
mcimadamore
parents:
diff changeset
     8
    void test() {
5ed5dd2ee5fe 8017618: NullPointerException in RichDiagnosticFormatter for bad input program
mcimadamore
parents:
diff changeset
     9
        Runnable add = (int x) -> (int y) -> x + y;
5ed5dd2ee5fe 8017618: NullPointerException in RichDiagnosticFormatter for bad input program
mcimadamore
parents:
diff changeset
    10
    }
5ed5dd2ee5fe 8017618: NullPointerException in RichDiagnosticFormatter for bad input program
mcimadamore
parents:
diff changeset
    11
}