diff -r 000000000000 -r 959103a6100f test/tools/javac/lambda/TargetType06.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/lambda/TargetType06.java Wed Apr 27 01:34:52 2016 +0800 @@ -0,0 +1,27 @@ +/* + * @test /nodynamiccopyright/ + * @bug 8003280 + * @summary Add lambda tests + * check complex case of target typing + * @author Maurizio Cimadamore + * @compile TargetType06.java + */ + +import java.util.List; + +class TargetType06 { + + class Foo { + Foo getFoo() { return null; } + } + + interface Function { + R invoke(A a); + } + + static List map(Function function) { return null; } + + void test() { + List l = map(foo -> foo.getFoo()); + } +}