mcimadamore@1415: /* mcimadamore@1415: * @test /nodynamiccopyright/ dlsmith@2395: * @bug 8003280 8034223 mcimadamore@1415: * @summary Add lambda tests mcimadamore@1415: * Check void-compatibility in strict vs. loose conversion contexts dlsmith@2395: * @compile TargetType16.java mcimadamore@1415: */ mcimadamore@1415: mcimadamore@1415: class TargetType16 { mcimadamore@1415: mcimadamore@1415: interface SAM1 { mcimadamore@1415: void m1(); mcimadamore@1415: } mcimadamore@1415: mcimadamore@1415: interface SAM2 { mcimadamore@1415: X m2(); mcimadamore@1415: } mcimadamore@1415: mcimadamore@1415: static void m(SAM1 s1) { } mcimadamore@1415: static void m(SAM2 s2) { } mcimadamore@1415: mcimadamore@1415: public static void main(String[] args) { dlsmith@2395: m(() -> { throw new AssertionError(); }); // prefer SAM2 mcimadamore@1415: } mcimadamore@1415: }