distinguish wildcards with raw/generic bounds (IDEA-97276)

This commit is contained in:
Anna Kozlova
2013-08-17 16:49:15 +04:00
parent 9df4195131
commit 507249a31b
2 changed files with 15 additions and 0 deletions
@@ -2,3 +2,16 @@ 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;
}
}