mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-17 21:15:58 +07:00
new inference: propagate outer method to constraints, initial (IDEA-117803)
This commit is contained in:
+17
@@ -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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user