overload resolution: adapt return types before comparing (IDEA-177065)

This commit is contained in:
Anna.Kozlova
2017-08-07 18:22:46 +02:00
parent f1fd8e4bc7
commit dec0d16597
3 changed files with 28 additions and 3 deletions

View File

@@ -0,0 +1,23 @@
import java.util.Collections;
import java.util.List;
interface A<T, ID> {
Iterable<T> findAll(Iterable<ID> ids);
}
interface B<T, ID> {
List<T> findAll(Iterable<ID> ids);
}
interface C<T> extends B<T, Integer>, A<T, Integer> {}
interface D extends C<String> {}
class Test {
public void foo(D d, C<String> c) {
List<Integer> ids = Collections.emptyList();
List<String> strings = d.findAll(ids);
List<String> strings1 = c.findAll(ids);
}
}