mcimadamore@1415: /* mcimadamore@1415: * @test /nodynamiccopyright/ mcimadamore@1415: * @bug 8003280 mcimadamore@1415: * @summary Add lambda tests mcimadamore@1415: * Check void-compatibility in strict vs. loose conversion contexts mcimadamore@1415: * @compile/fail/ref=TargetType16.out -XDrawDiagnostics 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) { mcimadamore@1415: m(() -> { throw new AssertionError(); }); //ambiguous mcimadamore@1415: } mcimadamore@1415: }