diff -r 000000000000 -r 959103a6100f test/tools/javac/lambda/TargetType45.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/lambda/TargetType45.java Wed Apr 27 01:34:52 2016 +0800 @@ -0,0 +1,29 @@ +/* + * @test /nodynamiccopyright/ + * @bug 8003280 + * @summary Add lambda tests + * compiler crashes during flow analysis as it fails to report diagnostics during attribution + * @compile TargetType45.java + */ +class TargetType45 { + + interface Predicate { + boolean apply(X x); + } + + interface Mapper { + Y apply(X x); + } + + class Foo { + Foo filter(Predicate p) { return null; } + } + + static Predicate compose(Predicate pi, Mapper m) { return null; } + + static Predicate isOdd = i -> i % 2 != 0; + + void top10Counties(Foo foos) { + foos.filter(compose(isOdd, (String e) -> e.length())); + } +}