1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/tools/javac/lambda/TargetType06.java Sat Nov 17 19:01:03 2012 +0000 1.3 @@ -0,0 +1,27 @@ 1.4 +/* 1.5 + * @test /nodynamiccopyright/ 1.6 + * @bug 8003280 1.7 + * @summary Add lambda tests 1.8 + * check complex case of target typing 1.9 + * @author Maurizio Cimadamore 1.10 + * @compile/fail/ref=TargetType06.out -XDrawDiagnostics TargetType06.java 1.11 + */ 1.12 + 1.13 +import java.util.List; 1.14 + 1.15 +class TargetType06 { 1.16 + 1.17 + class Foo { 1.18 + Foo getFoo() { return null; } 1.19 + } 1.20 + 1.21 + interface Function<A,R> { 1.22 + R invoke(A a); 1.23 + } 1.24 + 1.25 + static <B> List<B> map(Function<B, B> function) { return null; } 1.26 + 1.27 + void test() { 1.28 + List<Foo> l = map(foo -> foo.getFoo()); 1.29 + } 1.30 +}