mcimadamore@1415: /* mcimadamore@1415: * @test /nodynamiccopyright/ mcimadamore@1415: * @bug 8003280 mcimadamore@1415: * @summary Add lambda tests mcimadamore@1415: * check strict method conversion does not allow loose method reference conversion mcimadamore@1415: * @compile/fail/ref=MethodReference26.out -XDrawDiagnostics MethodReference26.java mcimadamore@1415: */ mcimadamore@1415: mcimadamore@1415: class MethodReference26 { mcimadamore@1415: mcimadamore@1415: static void m(Integer i) { } mcimadamore@1415: mcimadamore@1415: interface SAM { mcimadamore@1415: void m(int x); mcimadamore@1415: } mcimadamore@1415: mcimadamore@1415: static void call(int i, SAM s) { } mcimadamore@1415: static void call(Integer i, SAM s) { } mcimadamore@1415: mcimadamore@1415: static void test() { mcimadamore@1415: call(1, MethodReference26::m); //ambiguous mcimadamore@1415: } mcimadamore@1415: }