mcimadamore@1415: /* mcimadamore@1415: * @test /nodynamiccopyright/ mcimadamore@1415: * @bug 8003280 mcimadamore@1415: * @summary Add lambda tests mcimadamore@1415: * complex case of lambda return type that depends on generic method mcimadamore@1415: * inference variable mcimadamore@1415: * @compile/fail/ref=TargetType20.out -XDrawDiagnostics TargetType20.java mcimadamore@1415: */ mcimadamore@1415: import java.util.*; mcimadamore@1415: mcimadamore@1415: class TargetType20 { mcimadamore@1415: mcimadamore@1415: interface SAM2 { mcimadamore@1415: List f(); mcimadamore@1415: } mcimadamore@1415: mcimadamore@1415: class Test { mcimadamore@1415: void call(SAM2 x, SAM2 y) { } mcimadamore@1415: { call(() -> Collections.emptyList(), () -> new ArrayList()); } mcimadamore@1415: } mcimadamore@1415: }