/* * @test /nodynamiccopyright/ * @bug 8003280 * @summary Add lambda tests * Structural most specific doesn't handle cases with wildcards in functional interfaces * @compile/fail/ref=MostSpecific04.out -XDrawDiagnostics MostSpecific04.java */ public class MostSpecific04 { interface DoubleMapper { double map(T t); } interface LongMapper { long map(T t); } static class MyList { void map(DoubleMapper m) { } void map(LongMapper m) { } } public static void meth() { MyList ls = new MyList(); ls.map(e->e.length()); //ambiguous - implicit ls.map((String e)->e.length()); //ok } }