method applicability: do not check erased types if method was not called on raw type (IDEA-104992)

This commit is contained in:
anna
2013-04-24 14:14:49 +02:00
parent 7219191352
commit 3433d392a3
3 changed files with 20 additions and 1 deletions
@@ -0,0 +1,17 @@
import java.util.Collection;
import java.util.Set;
class FooObject<T> {}
class FooId<T extends FooObject> {}
interface Bar {
<T extends FooObject, I extends FooId<? extends T>> T get(I key);
<T extends FooObject, I extends FooId<? extends T>> Collection<T> get(Collection<I> keys);
}
public class Target {
void foo(Bar bar) {
final Set<FooId<?>> keys = null;
final Collection<FooObject> values = bar.get(keys);
}
}