langtools/test/tools/javac/lambda/8067792/T8067792.java
author mcimadamore
Wed, 17 Dec 2014 16:47:56 +0000
changeset 28146 adf3a039cb7d
permissions -rw-r--r--
8067792: Javac crashes in finder mode with nested implicit lambdas Summary: Revert tree changes occurred in Attr before running the analyzer Reviewed-by: jlahoda
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
28146
adf3a039cb7d 8067792: Javac crashes in finder mode with nested implicit lambdas
mcimadamore
parents:
diff changeset
     1
/*
adf3a039cb7d 8067792: Javac crashes in finder mode with nested implicit lambdas
mcimadamore
parents:
diff changeset
     2
 * @test /nodynamiccopyright/
adf3a039cb7d 8067792: Javac crashes in finder mode with nested implicit lambdas
mcimadamore
parents:
diff changeset
     3
 * @bug 8067792
adf3a039cb7d 8067792: Javac crashes in finder mode with nested implicit lambdas
mcimadamore
parents:
diff changeset
     4
 * @summary Javac crashes in finder mode with nested implicit lambdas
adf3a039cb7d 8067792: Javac crashes in finder mode with nested implicit lambdas
mcimadamore
parents:
diff changeset
     5
 * @compile/fail/ref=T8067792.out -XDrawDiagnostics -Werror -XDfind=lambda T8067792.java
adf3a039cb7d 8067792: Javac crashes in finder mode with nested implicit lambdas
mcimadamore
parents:
diff changeset
     6
 */
adf3a039cb7d 8067792: Javac crashes in finder mode with nested implicit lambdas
mcimadamore
parents:
diff changeset
     7
adf3a039cb7d 8067792: Javac crashes in finder mode with nested implicit lambdas
mcimadamore
parents:
diff changeset
     8
import java.util.stream.*;
adf3a039cb7d 8067792: Javac crashes in finder mode with nested implicit lambdas
mcimadamore
parents:
diff changeset
     9
import java.util.*;
adf3a039cb7d 8067792: Javac crashes in finder mode with nested implicit lambdas
mcimadamore
parents:
diff changeset
    10
adf3a039cb7d 8067792: Javac crashes in finder mode with nested implicit lambdas
mcimadamore
parents:
diff changeset
    11
class T8067792 {
adf3a039cb7d 8067792: Javac crashes in finder mode with nested implicit lambdas
mcimadamore
parents:
diff changeset
    12
    void test(Stream<List<?>> sl) {
adf3a039cb7d 8067792: Javac crashes in finder mode with nested implicit lambdas
mcimadamore
parents:
diff changeset
    13
        Runnable r = new Runnable() {
adf3a039cb7d 8067792: Javac crashes in finder mode with nested implicit lambdas
mcimadamore
parents:
diff changeset
    14
            public void run() {
adf3a039cb7d 8067792: Javac crashes in finder mode with nested implicit lambdas
mcimadamore
parents:
diff changeset
    15
                Stream<List<?>> constructor = sl.filter(c -> true);
adf3a039cb7d 8067792: Javac crashes in finder mode with nested implicit lambdas
mcimadamore
parents:
diff changeset
    16
            }
adf3a039cb7d 8067792: Javac crashes in finder mode with nested implicit lambdas
mcimadamore
parents:
diff changeset
    17
        };
adf3a039cb7d 8067792: Javac crashes in finder mode with nested implicit lambdas
mcimadamore
parents:
diff changeset
    18
    }
adf3a039cb7d 8067792: Javac crashes in finder mode with nested implicit lambdas
mcimadamore
parents:
diff changeset
    19
}