provably distinct: ? extends A should be provably distinct from Object until A is not an Object (IDEA-105695)

This commit is contained in:
anna
2013-04-23 15:35:49 +02:00
parent 1874c274e6
commit 516a76fa3b
3 changed files with 16 additions and 0 deletions
@@ -0,0 +1,10 @@
import java.util.Map;
public class Test {
void bar(Prop p) {
Map<? extends String, ? extends String> map = <error descr="Inconvertible types; cannot cast 'Prop' to 'java.util.Map<? extends java.lang.String,? extends java.lang.String>'">(Map<? extends String, ? extends String>)p</error>;
}
}
abstract class Hashtble<K,V> implements Map<K,V> {}
abstract class Prop extends Hashtble<Object, Object>{}