aoqi@0: /* aoqi@0: * @test /nodynamiccopyright/ aoqi@0: * @bug 8003280 aoqi@0: * @summary Add lambda tests aoqi@0: * failure to infer exception thrown types from lambda body causes checked exception to be skipped aoqi@0: * @author Maurizio Cimadamore aoqi@0: * @compile/fail/ref=TargetType13.out -XDlambdaInferenceDiags=false -XDrawDiagnostics TargetType13.java aoqi@0: */ aoqi@0: aoqi@0: class TargetType13 { aoqi@0: aoqi@0: interface SAM { aoqi@0: void m(Integer x) throws E; aoqi@0: } aoqi@0: aoqi@0: static void call(SAM s) throws E { } aoqi@0: aoqi@0: void test() { aoqi@0: call(i -> { if (i == 2) throw new Exception(); return; }); aoqi@0: } aoqi@0: }