/* * @test /nodynamiccopyright/ * @bug 8033483 * @summary Should ignore nested lambda bodies during overload resolution * @compile/fail/ref=IgnoreLambdaBodyDuringResolutionTest2.out -XDrawDiagnostics IgnoreLambdaBodyDuringResolutionTest2.java */ class IgnoreLambdaBodyDuringResolutionTest2 { interface SAM { boolean test(S t); } I bar(final T l) { return null; } class D { void foo() { m(bar(e -> false)); } void m(Class arg) {} void m(SAM arg) {} } class F { void foo() { m(bar((String e) -> false)); } void m(Class arg) {} void m(SAM arg) {} } }