mcimadamore@1415: /* mcimadamore@1415: * @test /nodynamiccopyright/ mcimadamore@1415: * @bug 8003280 mcimadamore@1415: * @summary Add lambda tests mcimadamore@1415: * check complex case of target typing mcimadamore@1415: * @author Maurizio Cimadamore mcimadamore@1415: * @compile/fail/ref=TargetType06.out -XDrawDiagnostics TargetType06.java mcimadamore@1415: */ mcimadamore@1415: mcimadamore@1415: import java.util.List; mcimadamore@1415: mcimadamore@1415: class TargetType06 { mcimadamore@1415: mcimadamore@1415: class Foo { mcimadamore@1415: Foo getFoo() { return null; } mcimadamore@1415: } mcimadamore@1415: mcimadamore@1415: interface Function { mcimadamore@1415: R invoke(A a); mcimadamore@1415: } mcimadamore@1415: mcimadamore@1415: static List map(Function function) { return null; } mcimadamore@1415: mcimadamore@1415: void test() { mcimadamore@1415: List l = map(foo -> foo.getFoo()); mcimadamore@1415: } mcimadamore@1415: }