new inference: initial tests

This commit is contained in:
Anna Kozlova
2013-09-20 12:11:57 +04:00
parent 970a180902
commit 935cdbaf3b
229 changed files with 7713 additions and 1 deletions
@@ -0,0 +1,17 @@
interface Interf<X extends Interf> {}
class SomeClass {
static <I extends Interf<? super I>> Class<I> someMethod(I i) { return null; }
}
interface OtherInterf<I1 extends Interf, I2 extends Interf> {}
interface ImmutableSet<S> {}
class SomeOtherClass {
static ImmutableSet<Class<? extends OtherInterf<?, ?>>> someOtherMethod() {
return <error descr="Inconvertible types; cannot cast 'ImmutableSet<java.lang.Class<? extends OtherInterf>>' to 'ImmutableSet<java.lang.Class<? extends OtherInterf<?,?>>>'">(ImmutableSet<Class<? extends OtherInterf<?, ?>>>)aux(OtherInterf.class)</error>;
}
static <T> ImmutableSet<Class<? extends T>> aux(Class<T> t) {
return null;
}
}