new inference: testdata to prevent regression

(cherry picked from commit 48a86f05e7661d2a96cf6c6d95eaa4629446d0bb)
This commit is contained in:
anna
2013-11-22 09:26:03 +01:00
parent 4001f9fccc
commit 4360e420ae
2 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
import java.util.*;
abstract class TypeTest {
interface I {}
public Collection<? extends I> excludeFrom(Collection<? extends I> include, Collection<? extends I> exclude) {
return copyOf(filter(include, not(in(exclude))));
}
interface Predicate<T> {
boolean apply(T t);
}
abstract <T> Predicate<T> in(Collection<? extends T> target);
abstract <T> Predicate<T> not(Predicate<T> aPredicate);
abstract <E> List<E> copyOf(Iterable<? extends E> elements);
abstract <T> Iterable<T> filter(Iterable<T> unfiltered, Predicate<? super T> predicate);
}