aoqi@0: /* aoqi@0: * @test /nodynamiccopyright/ aoqi@0: * @bug 8003280 aoqi@0: * @summary Add lambda tests aoqi@0: * target type inference in a case where lambda expression returns diamond aoqi@0: * @compile/fail/ref=TargetType28.out -XDrawDiagnostics TargetType28.java aoqi@0: */ aoqi@0: aoqi@0: class TargetType28 { aoqi@0: static class SuperFoo {} aoqi@0: aoqi@0: static class Foo extends SuperFoo {} aoqi@0: aoqi@0: interface A { aoqi@0: SuperFoo m(X x); aoqi@0: } aoqi@0: aoqi@0: SuperFoo apply(A ax, Z x) { return null; } aoqi@0: aoqi@0: SuperFoo ls = apply(x-> new Foo<>(), 1); aoqi@0: SuperFoo li = apply(x-> new Foo<>(), 1); aoqi@0: SuperFoo lw = apply(x-> new Foo<>(), 1); aoqi@0: }