JavaCompletionUtil: do not add an unnecessary cast if hierarchy signature has several levels

Fixes IDEA-185554 Redundant cast on autocompletion
This commit is contained in:
Tagir Valeev
2018-01-26 15:07:46 +07:00
parent 109276d13d
commit 6cb1553fdf
4 changed files with 38 additions and 1 deletions
@@ -0,0 +1,18 @@
class MyTest {
interface Container<K, V> {
V read(K k);
}
interface Container2<K, V> extends Container<K, V> {
V read(K k);
}
interface Container3<K, V> extends Container2<K, V> {
V read(K k);
}
void test(Container3<String, String> c3) {
Container<String, String> c = c3;
c.re<caret>
}
}