mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user