lambda: use incomplete substitutor when calc functional interface (IDEA-97038)

This commit is contained in:
anna
2012-12-18 20:26:31 +01:00
parent e94f80bd20
commit bd4346cea8
5 changed files with 52 additions and 15 deletions
@@ -0,0 +1,25 @@
import java.util.concurrent.atomic.AtomicInteger;
class Test {
static class List<T> {
public Stream<T> stream() {
return null;
}
}
interface IntFunction<T> {
public int applyAsInt(T t);
}
static class Stream<E> {
public Stream map(IntFunction<? super E> mapper) {
return null;
}
}
public static void main(List<AtomicInteger> list) {
list.stream().map(atomic -> atomic.get());
}
}