new inference: mark erased for type params/raw types compatibility (IDEA-122932)

This commit is contained in:
Anna Kozlova
2014-05-30 21:43:31 +04:00
parent a2615d0fc1
commit fffde12ba8
2 changed files with 7 additions and 0 deletions

View File

@@ -5,6 +5,11 @@ class Foo<T> {
public void test(Foo parent) {
List<Foo> elements = getElements(parent);
for (<error descr="Incompatible types. Found: 'java.lang.Object', required: 'Foo'">Foo foo : getElements(parent)</error>) {
System.out.println(foo);
}
}
public static <E extends Foo<E>> List<E> getElements(E parent) {