inference: ensure don't walk through explicitly specified type

This commit is contained in:
Anna.Kozlova
2017-02-09 10:14:07 +01:00
parent 9b0b5774a5
commit 2fc0560169
3 changed files with 25 additions and 1 deletions
@@ -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());
});
}
}