new inference: propagate outer method to constraints, initial (IDEA-117803)

This commit is contained in:
Anna Kozlova
2013-12-09 17:01:50 +04:00
parent b055f12e86
commit 3bdaae06c9
5 changed files with 38 additions and 8 deletions
@@ -0,0 +1,17 @@
public class Tmp
{
interface BiFunction<T, U, R> {
R apply(T t, U u);
}
interface Sequence<T>
{
<R> Sequence<R> scan(R init, BiFunction<R, T, R> func);
}
static <T> void foo(Sequence<T> sequence){}
void test(Sequence<String> strings) {
foo(strings.scan(1, (i, s) -> 1));
}
}