new inference: provide incomplete inference results for lambda (IDEA-162035; IDEA-155230)

This commit is contained in:
Anna.Kozlova
2016-10-06 16:21:05 +02:00
parent a0ea0d7eda
commit 62d25f9d05
7 changed files with 82 additions and 36 deletions
@@ -0,0 +1,21 @@
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Stream;
class A {
{
run(A.class, this, (o) -> {
o.meth();
<error descr="Missing return statement">}</error>);
Map<Integer, Integer> map = Stream.iterate(5, <error descr="no instance(s) of type variable(s) T exist so that Stream<T> conforms to Map<Integer, Integer>">t -> t + 5</error>);
}
void meth() {}
<T> T run(Class<T> c, T t, Function<T, T> f) {
return f.apply(t);
}
}