blob: 3d1e6f83ee67ae3b7314365af95eea66140bce0b [file] [log] [blame]
/*
* @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<X> {
boolean apply(X x);
}
interface Mapper<X, Y> {
Y apply(X x);
}
class Foo<X> {
Foo<X> filter(Predicate<? super X> p) { return null; }
}
static <U, V> Predicate<U> compose(Predicate<? super V> pi, Mapper<? super U, ? extends V> m) { return null; }
static Predicate<Integer> isOdd = i -> i % 2 != 0;
void top10Counties(Foo<String> foos) {
foos.filter(compose(isOdd, (String e) -> e.length()));
}
}