mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 09:19:13 +07:00
java inference: support nested constraints inside code blocks (IDEA-237446)
GitOrigin-RevId: e865db7a88560615b1abca31b3ceefeb1ae76573
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e46cd16b38
commit
641ac74ad8
+28
@@ -0,0 +1,28 @@
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
||||
class MyTest<O> {
|
||||
private void test(MyTest<List<String>> listMono) {
|
||||
expand(id -> listMono.flatMap(l -> {
|
||||
if (l.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
return MyTest.empty();
|
||||
}
|
||||
}));
|
||||
}
|
||||
void expand(Function<? super List<String>, ? extends MyTest<? extends List<String>>> expander) {
|
||||
|
||||
}
|
||||
|
||||
public final <R> MyTest<R> flatMap(Function<? super List<String>, ? extends MyTest<? extends R>> transformer) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public static <T> MyTest<T> empty() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user