/* * @test /nodynamiccopyright/ * @bug 8003280 * @summary Add lambda tests * Structural most specific doesn't handle cases with wildcards in functional interfaces * @compile/fail/ref=MostSpecific05.out -XDrawDiagnostics MostSpecific05.java */ public class MostSpecific05 { interface ObjectConverter { T map(Object o); } interface NumberConverter { T map(Object o); } static class MyMapper { void map(ObjectConverter m) { } void map(NumberConverter m) { } } public static void meth() { MyMapper mm = new MyMapper(); mm.map(e->1.0); //ambiguous - implicit mm.map((Object e)->1.0); //ok } }