mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
inference: ensure don't walk through explicitly specified type
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
interface DuallyParametric<A0> {
|
||||
default <R> R match(Supplier<R> bFn) {
|
||||
return null;
|
||||
}
|
||||
|
||||
static <Ab> DuallyParametric<Ab> b() {
|
||||
return null;
|
||||
}
|
||||
|
||||
static void foldLeft(Runnable fn) {}
|
||||
|
||||
default void merge(DuallyParametric<A0> first) {
|
||||
foldLeft(() -> {
|
||||
Supplier<DuallyParametric<A0>> bDuallyParametricFunction = () -> first.match(() -> b());
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user