switch tests on new inference

(cherry picked from commit d2cbf3f2833104c3a0381059b0d6ef8ac0b3c94c)
This commit is contained in:
anna
2013-11-15 18:33:16 +01:00
parent 23432e3cd7
commit 481bc252f3
44 changed files with 698 additions and 32 deletions

View File

@@ -0,0 +1,12 @@
public class Test<A,B> {
public static <P,Q> Test<P,Q> left(P p) { return null; }
public static <P,Q> Test<P,Q> right(Q q) { return null; }
public <C> C either(Function<A, C> leftFn, Function<B, C> rightFn){ return null; }
public Test<B,A> swap() {
return either(Test::<B,A>right, Test::<B,A>left);
}
}
interface Function<T, R> {
R fun(T t);
}