mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 18:09:38 +07:00
overload resolution: infer most specific agains formal param types substituted against site substitutor, including param bounds (IDEA-150773)
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import java.util.List;
|
||||
|
||||
class TestIntelliJ<T, S extends List<T>> extends SubInterface<T, S> {
|
||||
private <H extends SuperInterface<T, S>> H <warning descr="Private method 'test(H)' is never used">test</warning>(H t) {
|
||||
System.out.println("SuperInterface" + t);
|
||||
return t;
|
||||
}
|
||||
|
||||
private <H extends SubInterface<T, S>> H test(H t) {
|
||||
System.out.println("SubInterface" + t);
|
||||
return t;
|
||||
}
|
||||
|
||||
public static void main(String... args) {
|
||||
TestIntelliJ<String, List<String>> testIntelliJ = new TestIntelliJ<>();
|
||||
testIntelliJ.test(testIntelliJ);
|
||||
}
|
||||
}
|
||||
|
||||
interface SuperInterface<T, <warning descr="Type parameter 'S' is never used">S</warning> extends List<T>> {
|
||||
}
|
||||
|
||||
abstract class SubInterface<T, S extends List<T>> implements SuperInterface<T, S> {
|
||||
}
|
||||
Reference in New Issue
Block a user