/* * @test /nodynamiccopyright/ * @bug 8175790 * @summary field JCVariableDecl.vartype can't be null after post attribution analysis * @compile/fail/ref=NPEDueToErroneousLambdaTest.out -XDrawDiagnostics NPEDueToErroneousLambdaTest.java */ import java.util.List; import java.util.function.Function; public abstract class NPEDueToErroneousLambdaTest { interface R {} interface A {} interface S {} abstract Function p(final Function function); abstract List t(Function function); public void f() { t(p(new Function() { public List apply(A a) throws Exception { return t((Function)input -> { return t(p((Function) i -> null), null); }); } })); } }