introduce parameter object: check real types "are they generic or not" when object's class signature is composed ( IDEA-46182 )

This commit is contained in:
anna
2010-05-11 16:08:09 +04:00
parent 31ebd3d607
commit 4482e47195
4 changed files with 75 additions and 7 deletions

View File

@@ -0,0 +1,24 @@
import java.util.Collection;
import java.util.List;
public class Test<U extends List> {
public Collection foo(Param param) {
return param.getP();
}
public void context1(U p) {
Collection v = foo(new Param(p));
}
private static class Param {
private final Collection p;
private Param(Collection p) {
this.p = p;
}
public Collection getP() {
return p;
}
}
}

View File

@@ -0,0 +1,12 @@
import java.util.Collection;
import java.util.List;
public class Test<U extends List> {
public Collection foo(U p) {
return p;
}
public void context1(U p) {
Collection v = foo(p);
}
}