/* * @test /nodynamiccopyright/ * @bug 8003280 * @summary Add lambda tests * speculative cache contents are overwritten by deferred type-checking of nested stuck expressions * @compile/fail/ref=MostSpecific07.out -XDrawDiagnostics MostSpecific07.java */ import java.util.*; class MostSpecific07 { interface Predicate { Y accept(X x); } interface VoidMapper { void accept(); } interface ExtPredicate extends Predicate { } void test(boolean cond, ArrayList als, VoidMapper vm) { m(u -> ()->{}, als, als, vm); m((u -> ()->{}), als, als, vm); m(cond ? u -> ()->{} : u -> ()->{}, als, als, vm); } U m(Predicate p, List lu, ArrayList au, V v) { return null; } U m(ExtPredicate ep, ArrayList au, List lu, V v) { return null; } }