graph inference for the first arg

This commit is contained in:
anna
2013-02-13 12:18:47 +01:00
parent c6b306980b
commit ac0f65d247
4 changed files with 40 additions and 5 deletions

View File

@@ -0,0 +1,18 @@
import java.util.*;
class Main {
public static <T> T foo() {return null;}
public static <B extends A, A> void bar0(B b, A a) {}
public static <B extends A, A> void bar(A a, B b) {}
public static <B extends List<A>, A> void bar1(B b, A a) {}
public static <B extends Integer, A> void bar2(B b, A a) {}
public static <B extends C, A, C> void bar3(B b, A a) {}
static {
bar0(foo(), "");
bar("", foo());
bar1(foo(), "");
bar2(foo(), "");
bar3(foo(), "");
}
}