mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-02 03:07:47 +07:00
overload resolution: provide type parameter bounds with site substitutor to correctly compare types during most specific check (IDEA-144463)
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
class Test {
|
||||
|
||||
public static class Foo<T> {
|
||||
public void set(Iterable<T> v) {
|
||||
System.out.println(v);
|
||||
}
|
||||
|
||||
public <Y extends List<T>> void set(Y v) {
|
||||
System.out.println(v);
|
||||
}
|
||||
}
|
||||
|
||||
static void main(Foo<Double> doubleFoo, ArrayList<Double> data) {
|
||||
doubleFoo.set(data);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user